Skip to content

Commit

Permalink
kill dev_ifname32()
Browse files Browse the repository at this point in the history
same story...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Al Viro committed Jan 25, 2018
1 parent f92d4fc commit 4cf808e
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions net/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -2666,25 +2666,6 @@ static int do_siocgstampns(struct net *net, struct socket *sock,
return err;
}

static int dev_ifname32(struct net *net, struct compat_ifreq __user *uifr32)
{
struct ifreq __user *uifr;
int err;

uifr = compat_alloc_user_space(sizeof(struct ifreq));
if (copy_in_user(uifr, uifr32, sizeof(struct compat_ifreq)))
return -EFAULT;

err = dev_ioctl(net, SIOCGIFNAME, uifr);
if (err)
return err;

if (copy_in_user(uifr32, uifr, sizeof(struct compat_ifreq)))
return -EFAULT;

return 0;
}

static int compat_dev_ifconf(struct net *net, struct compat_ifconf __user *uifc32)
{
struct compat_ifconf ifc32;
Expand Down Expand Up @@ -3034,8 +3015,6 @@ static int compat_sock_ioctl_trans(struct file *file, struct socket *sock,
case SIOCSIFBR:
case SIOCGIFBR:
return old_bridge_ioctl(argp);
case SIOCGIFNAME:
return dev_ifname32(net, argp);
case SIOCGIFCONF:
return compat_dev_ifconf(net, argp);
case SIOCETHTOOL:
Expand Down Expand Up @@ -3112,6 +3091,7 @@ static int compat_sock_ioctl_trans(struct file *file, struct socket *sock,
case SIOCBONDRELEASE:
case SIOCBONDSETHWADDR:
case SIOCBONDCHANGEACTIVE:
case SIOCGIFNAME:
return sock_do_ioctl(net, sock, cmd, arg);
}

Expand Down

0 comments on commit 4cf808e

Please sign in to comment.