Re: [Bug 2683] arch/sparc64/kernel/sunos_ioctl32.c: sys_ioctl wrong?

"David S. Miller" <[email protected]>
Newsgroups gmane.linux.ports.ultrapenguin
Message-ID <[email protected]>
From: Adrian Bunk <[email protected]>
Date: Sat, 3 Sep 2005 00:38:16 +0200

> Can anyone confirm whether it is a bug or not?

Yep, it's a bug.  I've checked in the suggested fix as
follows:

diff-tree 09bbe1043a65903c93f6b6df123e36e3584bfac7 (from 93c37f292110a37dd77e4cc0aaf1c341d79bf6aa)
Author: David S. Miller <[email protected]>
Date:   Tue Sep 6 20:12:15 2005 -0700

    [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 <[email protected]>

diff --git a/arch/sparc64/kernel/sunos_ioctl32.c b/arch/sparc64/kernel/sunos_ioctl32.c
--- 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 
 		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):
-
To unsubscribe from this list: send the line "unsubscribe ultralinux" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.