lkml.org 
[lkml]   [2003]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] Fix NULL handler for compat_ioctl
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();
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:35    [W:0.030 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site