Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fab2532b authored by Arnd Bergmann's avatar Arnd Bergmann Committed by David S. Miller
Browse files

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: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f6b8f32c
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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;