From 09bbe1043a65903c93f6b6df123e36e3584bfac7 Mon Sep 17 00:00:00 2001 From: "David S. Miller" Date: Tue, 6 Sep 2005 20:12:15 -0700 Subject: [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: David S. Miller --- arch/sparc64/kernel/sunos_ioctl32.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/arch/sparc64/kernel/sunos_ioctl32.c b/arch/sparc64/kernel/sunos_ioctl32.c index 87c1aeb0222..7654b8a7f03 100644 --- a/arch/sparc64/kernel/sunos_ioctl32.c +++ b/arch/sparc64/kernel/sunos_ioctl32.c @@ -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): -- cgit v1.2.3-18-g5258