diff options
author | Arnd Bergmann <arnd@arndb.de> | 2009-11-08 23:56:21 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-11-08 23:56:21 -0500 |
commit | fab2532ba50b287647d95046c4f3b37bf6379d37 (patch) | |
tree | 2fe0adee55965f6e2f6f0a4147add521e89cb098 /net | |
parent | f6b8f32ca71406de718391369490f6b1e81fe0bb (diff) |
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 <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/socket.c | 3 |
1 files changed, 3 insertions, 0 deletions
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, | |||
2746 | case SIOCGIFBRDADDR: | 2746 | case SIOCGIFBRDADDR: |
2747 | case SIOCGIFDSTADDR: | 2747 | case SIOCGIFDSTADDR: |
2748 | case SIOCGIFNETMASK: | 2748 | case SIOCGIFNETMASK: |
2749 | case SIOCGIFPFLAGS: | ||
2749 | case SIOCGIFTXQLEN: | 2750 | case SIOCGIFTXQLEN: |
2751 | case SIOCGMIIPHY: | ||
2752 | case SIOCGMIIREG: | ||
2750 | if (copy_to_user(uifr32, &ifr, sizeof(*uifr32))) | 2753 | if (copy_to_user(uifr32, &ifr, sizeof(*uifr32))) |
2751 | return -EFAULT; | 2754 | return -EFAULT; |
2752 | break; | 2755 | break; |