All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix NULL handler for compat_ioctl
@ 2003-05-01  1:34 Ben Collins
  2003-05-01  2:41 ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: Ben Collins @ 2003-05-01  1:34 UTC (permalink / raw)
  To: Linus Torvalds, Pavel Machek; +Cc: linux-kernel

Pretty serious ommision, but I'm guessing there's not too many users of
the {un,}register_ioctl32_conversion calls. Linux1394 just happens to
use it quite extensively, so this showed up on my radar by coincidence.

You are supposed to be able to pass a NULL handler to
register_ioctl32_conversion to signify a compatible translation, IOW,
use the 64-bit ioctl handler. Without this patch, we would instead jump
to a NULL address.

Applies to current 2.5.68-bk (see Larry, someone is using bk-cvs for
something good :).


diff -u -u -r1.8 compat.c
--- linux/fs/compat.c	30 Apr 2003 16:17:21 -0000	1.8
+++ linux/fs/compat.c	1 May 2003 01:45:46 -0000
@@ -229,7 +229,10 @@
 	
 	t->next = NULL;
 	t->cmd = cmd;
-	t->handler = handler; 
+	if (!handler)
+		t->handler = (void *)sys_ioctl;
+	else
+		t->handler = handler; 
 	ioctl32_insert_translation(t);
 
 	unlock_kernel();

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-05-01  3:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-01  1:34 [PATCH] Fix NULL handler for compat_ioctl Ben Collins
2003-05-01  2:41 ` Andrew Morton
2003-05-01  2:59   ` Ben Collins
2003-05-01  3:40     ` Andrew Morton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.