Skip to content

Commit

Permalink
[SPARC64]: Fix set/get MTU cases in sunos_ioctl()
Browse files Browse the repository at this point in the history
Need to use compat struct sizes and compat_sys_ioctl().
Reported by Adrian Bunk via kernel bugzilla #2683

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Sep 7, 2005
1 parent 93c37f2 commit 09bbe10
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions arch/sparc64/kernel/sunos_ioctl32.c
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 09bbe10

Please sign in to comment.