From fab2532ba50b287647d95046c4f3b37bf6379d37 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Sun, 8 Nov 2009 20:56:21 -0800 Subject: net, compat_ioctl: fix SIOCGMII ioctls SIOCGMIIPHY and SIOCGMIIREG return data through ifreq, so it needs to be converted on the way out as well. SIOCGIFPFLAGS is unused, but has the same problem in theory. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller --- net/socket.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'net/socket.c') diff --git a/net/socket.c b/net/socket.c index bfbde200b743..224e7f73fdf0 100644 --- a/net/socket.c +++ b/net/socket.c @@ -2746,7 +2746,10 @@ static int dev_ifsioc(struct net *net, struct socket *sock, case SIOCGIFBRDADDR: case SIOCGIFDSTADDR: case SIOCGIFNETMASK: + case SIOCGIFPFLAGS: case SIOCGIFTXQLEN: + case SIOCGMIIPHY: + case SIOCGMIIREG: if (copy_to_user(uifr32, &ifr, sizeof(*uifr32))) return -EFAULT; break; -- cgit v1.2.2