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

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 <alan@redhat.com>
Cc: Paul Fulghum <paulkf@microgate.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
1f8cabb7 341339e7

+55 -21
+5 -1
drivers/char/synclink.c
··· 2942 2942 unsigned int cmd, unsigned long arg) 2943 2943 { 2944 2944 struct mgsl_struct * info = (struct mgsl_struct *)tty->driver_data; 2945 + int ret; 2945 2946 2946 2947 if (debug_level >= DEBUG_LEVEL_INFO) 2947 2948 printk("%s(%d):mgsl_ioctl %s cmd=%08X\n", __FILE__,__LINE__, ··· 2957 2956 return -EIO; 2958 2957 } 2959 2958 2960 - return mgsl_ioctl_common(info, cmd, arg); 2959 + lock_kernel(); 2960 + ret = mgsl_ioctl_common(info, cmd, arg); 2961 + unlock_kernel(); 2962 + return ret; 2961 2963 } 2962 2964 2963 2965 static int mgsl_ioctl_common(struct mgsl_struct *info, unsigned int cmd, unsigned long arg)
+11 -1
drivers/char/synclinkmp.c
··· 1303 1303 * 1304 1304 * Return Value: 0 if success, otherwise error code 1305 1305 */ 1306 - static int ioctl(struct tty_struct *tty, struct file *file, 1306 + static int do_ioctl(struct tty_struct *tty, struct file *file, 1307 1307 unsigned int cmd, unsigned long arg) 1308 1308 { 1309 1309 SLMP_INFO *info = (SLMP_INFO *)tty->driver_data; ··· 1391 1391 return -ENOIOCTLCMD; 1392 1392 } 1393 1393 return 0; 1394 + } 1395 + 1396 + static int ioctl(struct tty_struct *tty, struct file *file, 1397 + unsigned int cmd, unsigned long arg) 1398 + { 1399 + int ret; 1400 + lock_kernel(); 1401 + ret = do_ioctl(tty, file, cmd, arg); 1402 + unlock_kernel(); 1403 + return ret; 1394 1404 } 1395 1405 1396 1406 /*