Explorar o código

uctrl: BKL pushdown

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Arnd Bergmann %!s(int64=17) %!d(string=hai) anos
pai
achega
f138e4814a
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      drivers/sbus/char/uctrl.c

+ 3 - 0
drivers/sbus/char/uctrl.c

@@ -9,6 +9,7 @@
 #include <linux/delay.h>
 #include <linux/interrupt.h>
 #include <linux/slab.h>
+#include <linux/smp_lock.h>
 #include <linux/ioport.h>
 #include <linux/init.h>
 #include <linux/miscdevice.h>
@@ -211,8 +212,10 @@ uctrl_ioctl(struct inode *inode, struct file *file,
 static int
 uctrl_open(struct inode *inode, struct file *file)
 {
+	lock_kernel();
 	uctrl_get_event_status();
 	uctrl_get_external_status();
+	unlock_kernel();
 	return 0;
 }