lkml.org 
[lkml]   [2020]   [May]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 4/4] ipv4,appletalk: move SIOCADDRT and SIOCDELRT handling into ->compat_ioctl
From
From: Christoph Hellwig <hch@lst.de>
Date: Thu, 14 May 2020 16:45:35 +0200

> #ifdef CONFIG_COMPAT
> +static int atalk_compat_routing_ioctl(struct sock *sk, unsigned int cmd,
> + struct compat_rtentry __user *ur)
> +{
> + struct rtentry rt;
> + compat_uptr_t rtdev;
> +

Reverse christmas tree please.

> static int atalk_compat_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
> {
> + struct sock *sk = sock->sk;
> + void __user *argp = compat_ptr(arg);

Likewise.

> diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
> index 6177c4ba00370..b99c5e36e0a8f 100644
> --- a/net/ipv4/af_inet.c
> +++ b/net/ipv4/af_inet.c
> @@ -968,17 +969,42 @@ int inet_ioctl(struct socket *sock, unsigned int cmd, unsigned long arg)
> EXPORT_SYMBOL(inet_ioctl);
>
> #ifdef CONFIG_COMPAT
> +static int inet_compat_routing_ioctl(struct sock *sk, unsigned int cmd,
> + struct compat_rtentry __user *ur)
> +{
> + struct rtentry rt;
> + compat_uptr_t rtdev;

Likewise.

\
 
 \ /
  Last update: 2020-05-15 02:52    [W:0.070 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site