Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

rio: push down the BKL into the firmware ioctl handler

TTY side is already done.

Signed-off-by: Alan Cox <alan@redhat.com>
Cc: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Alan Cox and committed by
Linus Torvalds
f6759fdc 909d145f

+5 -3
+5 -3
drivers/char/rio/rio_linux.c
··· 179 179 static void rio_hungup(void *ptr); 180 180 static void rio_close(void *ptr); 181 181 static int rio_chars_in_buffer(void *ptr); 182 - static int rio_fw_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg); 182 + static long rio_fw_ioctl(struct file *filp, unsigned int cmd, unsigned long arg); 183 183 static int rio_init_drivers(void); 184 184 185 185 static void my_hd(void *addr, int len); ··· 240 240 241 241 static const struct file_operations rio_fw_fops = { 242 242 .owner = THIS_MODULE, 243 - .ioctl = rio_fw_ioctl, 243 + .unlocked_ioctl = rio_fw_ioctl, 244 244 }; 245 245 246 246 static struct miscdevice rio_fw_device = { ··· 560 560 561 561 562 562 563 - static int rio_fw_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, unsigned long arg) 563 + static long rio_fw_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) 564 564 { 565 565 int rc = 0; 566 566 func_enter(); 567 567 568 568 /* The "dev" argument isn't used. */ 569 + lock_kernel(); 569 570 rc = riocontrol(p, 0, cmd, arg, capable(CAP_SYS_ADMIN)); 571 + unlock_kernel(); 570 572 571 573 func_exit(); 572 574 return rc;