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

Commit 09bbe104 authored by David S. Miller's avatar David S. Miller
Browse files

[SPARC64]: Fix set/get MTU cases in sunos_ioctl()



Need to use compat struct sizes and compat_sys_ioctl().
Reported by Adrian Bunk via kernel bugzilla #2683

Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 93c37f29
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -152,11 +152,12 @@ asmlinkage int sunos_ioctl (int fd, u32 cmd, u32 arg)
		ret = compat_sys_ioctl(fd, SIOCGIFCONF, arg);
		goto out;

	case _IOW('i', 21, struct ifreq): /* SIOCSIFMTU */
		ret = sys_ioctl(fd, SIOCSIFMTU, arg);
	case _IOW('i', 21, struct ifreq32):
		ret = compat_sys_ioctl(fd, SIOCSIFMTU, arg);
		goto out;
	case _IOWR('i', 22, struct ifreq): /* SIOCGIFMTU */
		ret = sys_ioctl(fd, SIOCGIFMTU, arg);

	case _IOWR('i', 22, struct ifreq32):
		ret = compat_sys_ioctl(fd, SIOCGIFMTU, arg);
		goto out;

	case _IOWR('i', 23, struct ifreq32):