[2.4.22-rc2] x86-64 register_ioctl32_conversion() breakage

From: Mikael Pettersson
Date: Tue Aug 19 2003 - 18:08:34 EST


include/asm-x86_64/ioctl32.h states:

/*
* Register an 32bit ioctl translation handler for ioctl cmd.
*
* handler == NULL: use 64bit ioctl handler.
* arguments to handler: fd: file descriptor
* cmd: ioctl command.
* arg: ioctl argument
* struct file *file: file descriptor pointer.
*/

extern int register_ioctl32_conversion(unsigned int cmd, int (*handler)(unsigned int, unsigned int, unsigned long, struct file *));

The "handler == NULL" comment is true in 2.6 kernels (sys_ioctl()
get called, which is what we want for compatible ioctls), but not
in 2.4.22-rc2, where instead sys32_ioctl() oopses because it calls
a NULL function pointer. (I found that out when testing ia32
compatibility in the latest version of the perfctr driver.)

Either ia32_ioctl.c or the comment in ioctl32.h is wrong and should
be fixed. I'd prefer the code to work as in 2.6 since that avoids
#if LINUX_VERSION_CODE crap and dummy ioctl handlers.

/Mikael
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/