Skip to contentSkip to conversation

BUG? atleast >=2.6.19-rc5, x86 chroot on x86_64

DISCUSSION Chuck Ebbert 3 participants 3 messages Dec 13, 2006 VFS

lore
Share & tools
lore
#0 lore raw

In-Reply-To: <1165984783.23819.7.camel@localhost>

Quoted 2 lines · Kasper Sandberg

do you think it may be a bug in the kernel? the stuff with wine that gets thrown in the kernel messages?

Let's just say the behavior has changed. It now returns -EINVAL instead of -ENOTTY when the msdos IOCTLs fail.

Quoted 3 lines

im 100% positive wine does NOT have
access to any fat32, cause i entirely removed the only disk having such a filesystem, and it still likes to give this

That's when this happens: running certain programs that try msdos-type IOCTLs on native Linux filesystems.

Quoted 2 lines

however the last few
times i havent observed the app going nuts

If there aren't any other problems you can just turn off the logging.

Did you change something else?

Anyway, here is a much simpler patch that restores the previous behavior (but leaves the message.) However if you aren't having any problems now other than the messages maybe there's no real problem after all?

fs/compat.c +5 -1
@@ -444,7 +444,11 @@ asmlinkage long compat_sys_ioctl(unsigne
 
 		if (++count <= 50)
 			compat_ioctl_error(filp, fd, cmd, arg);
-		error = -EINVAL;
+
+		if (cmd == 0x82187201)
+			error = -ENOTTY;
+		else
+			error = -EINVAL;
 	}
 
 	goto out_fput;
Signature · 1 line
MBTI: IXTP
#1 lore raw
Quoted 10 lines · Chuck Ebbert

In-Reply-To: <1165984783.23819.7.camel@localhost>

Quoted 2 lines · Kasper Sandberg

do you think it may be a bug in the kernel? the stuff with wine that gets thrown in the kernel messages?

Let's just say the behavior has changed. It now returns -EINVAL instead of -ENOTTY when the msdos IOCTLs fail.

Quoted 6 lines
Quoted 3 lines

im 100% positive wine does NOT have
access to any fat32, cause i entirely removed the only disk having such a filesystem, and it still likes to give this

That's when this happens: running certain programs that try msdos-type IOCTLs on native Linux filesystems.

ohhh :) well wine may do that :)

Quoted 7 lines
Quoted 3 lines

however the last few
times i havent observed the app going nuts

If there aren't any other problems you can just turn off the logging.

Did you change something else?

i did upgrade from rc5 to final

Quoted 5 lines

Anyway, here is a much simpler patch that restores the previous behavior (but leaves the message.) However if you aren't having any problems now other than the messages maybe there's no real problem after all?

well the hardlock problem still occurs, however that, (as i believe has veen the semi-conclusion in this thread) arent related?

Quoted 16 lines
fs/compat.c +5 -1
@@ -444,7 +444,11 @@ asmlinkage long compat_sys_ioctl(unsigne
 
 		if (++count <= 50)
 			compat_ioctl_error(filp, fd, cmd, arg);
-		error = -EINVAL;
+
+		if (cmd == 0x82187201)
+			error = -ENOTTY;
+		else
+			error = -EINVAL;
 	}
 
 	goto out_fput;
#2 lore raw
In reply to Chuck Ebbert
Quoted 9 lines · On Wed, 13 Dec 2006 02:50:01 -0500 Chuck Ebbert <[email protected]>…

In-Reply-To: <1165984783.23819.7.camel@localhost>

Quoted 2 lines · Kasper Sandberg

do you think it may be a bug in the kernel? the stuff with wine that gets thrown in the kernel messages?

Let's just say the behavior has changed. It now returns -EINVAL instead of -ENOTTY when the msdos IOCTLs fail.

For an unknown ioctl the correct return is -ENOTTY. For an invalid ioctl (known but wrong parameters) it may be -EINVAL.

Quoted 4 lines

Anyway, here is a much simpler patch that restores the previous behavior (but leaves the message.) However if you aren't having any problems now other than the messages maybe there's no real problem after all?

As far as I can see from a quick review the code should return -ENOTTY in this situation not -EINVAL, for all unhandled ioctls.

Alan