[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20200514.175227.2037292271312428281.davem@davemloft.net>
Date: Thu, 14 May 2020 17:52:27 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: hch@....de
Cc: kuba@...nel.org, kuznet@....inr.ac.ru, yoshfuji@...ux-ipv6.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/4] ipv4,appletalk: move SIOCADDRT and SIOCDELRT
handling into ->compat_ioctl
From: Christoph Hellwig <hch@....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.
Powered by blists - more mailing lists