lkml.org 
[lkml]   [2000]   [Jul]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjectbug in register_ioctl32_conversion?
Date
Me thinks there's a bug in arch/sparc64/kernel/ioctl32.c,
in the register_ioctl32_conversion() routine:

int register_ioctl32_conversion(unsigned int cmd, int (*handler)(unsigned int, unsigned int, unsigned
long, struct file *))
{
int i;
if (!additional_ioctls) {
additional_ioctls = module_map(PAGE_SIZE);
if (!additional_ioctls) return -ENOMEM;
// <-- Need to memzero, or zero all additional_ioctls[].cmd fields here!
}
for (i = 0; i < PAGE_SIZE/sizeof(struct ioctl_trans); i++)
if (!additional_ioctls[i].cmd)
break;
if (i == PAGE_SIZE/sizeof(struct ioctl_trans))
return -ENOMEM;
additional_ioctls[i].cmd = cmd;
if (!handler)
additional_ioctls[i].handler = (u32)(long)sys_ioctl;
else
additional_ioctls[i].handler = (u32)(long)handler;
ioctl32_insert_translation(&additional_ioctls[i]);
return 0;
}

This has been [randomly] tripping up loading of one of our
driver modules for quite some time now.:-(

Thanks,
-SteveR

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

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.044 / U:0.236 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site