synclink series: Prepare for BKL pushdown
PATCH 1/1 synclink series: Prepare for BKL pushdown
As these are quite complex I've simply pushed the BKL down into the ioctl handler not tried to do anything neater.
Signed-off-by Alan Cox <[email protected]>
drivers/char/synclink.c +5 -1
@@ -2945,6 +2945,7 @@ unsigned int cmd, unsigned long arg) {struct mgsl_struct * info = (struct mgsl_struct *)tty->driver_data; +int ret;if (debug_level >=DEBUG_LEVEL_INFO ) printk("%s(%d):mgsl_ioctl %s cmd=%08X\n", __FILE__,__LINE__,
@@ -2959,7 +2960,10 @@return -EIO ; } -return mgsl_ioctl_common (info, cmd, arg); +lock_kernel (); + ret =mgsl_ioctl_common (info, cmd, arg); +unlock_kernel (); +return ret; }static int mgsl_ioctl_common (struct mgsl_struct *info,unsigned int cmd,unsigned long arg)
drivers/char/synclink_gt.c +39 -19
95 lines not on this page · raw message
drivers/char/synclinkmp.c +11 -1
@@ -1303,7 +1303,7 @@* * Return Value: 0 if success, otherwise error code */ -static int ioctl (struct tty_struct *tty,struct file *file, +static int do_ioctl (struct tty_struct *tty,struct file *file,unsigned int cmd,unsigned long arg) {SLMP_INFO *info = (SLMP_INFO *)tty->driver_data;
@@ -1393,6 +1393,16 @@return 0 ; } +static int ioctl (struct tty_struct *tty,struct file *file, +unsigned int cmd,unsigned long arg) +{ +int ret; +lock_kernel (); + ret =do_ioctl (tty, file, cmd, arg); +unlock_kernel (); +return ret; +} +/* * /proc fs routines.... */