diff options
author | stephen hemminger <shemminger@vyatta.com> | 2011-02-23 09:06:48 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-02-23 14:11:30 -0800 |
commit | c3f52ae6a378398127acb845087ddb9e8b67493b (patch) | |
tree | fb68840354fe33891f7e0baf035b5a1d8dbee98f | |
parent | e13e02a3c68d899169c78d9a18689bd73491d59a (diff) | |
download | op-kernel-dev-c3f52ae6a378398127acb845087ddb9e8b67493b.zip op-kernel-dev-c3f52ae6a378398127acb845087ddb9e8b67493b.tar.gz |
socket: suppress sparse warnings
Use __force to quiet sparse warnings for cases where the code
is simulating user space pointers.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | net/socket.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/socket.c b/net/socket.c index 9fa1e3b..937d0fc 100644 --- a/net/socket.c +++ b/net/socket.c @@ -2648,7 +2648,8 @@ static int bond_ioctl(struct net *net, unsigned int cmd, old_fs = get_fs(); set_fs(KERNEL_DS); - err = dev_ioctl(net, cmd, &kifr); + err = dev_ioctl(net, cmd, + (struct ifreq __user __force *) &kifr); set_fs(old_fs); return err; @@ -2757,7 +2758,7 @@ static int compat_sioc_ifmap(struct net *net, unsigned int cmd, old_fs = get_fs(); set_fs(KERNEL_DS); - err = dev_ioctl(net, cmd, (void __user *)&ifr); + err = dev_ioctl(net, cmd, (void __user __force *)&ifr); set_fs(old_fs); if (cmd == SIOCGIFMAP && !err) { @@ -2862,7 +2863,8 @@ static int routing_ioctl(struct net *net, struct socket *sock, ret |= __get_user(rtdev, &(ur4->rt_dev)); if (rtdev) { ret |= copy_from_user(devname, compat_ptr(rtdev), 15); - r4.rt_dev = devname; devname[15] = 0; + r4.rt_dev = (char __user __force *)devname; + devname[15] = 0; } else r4.rt_dev = NULL; |