Put explicit lock_kernel() calls into bpp_open(). It has locking, but I'm
not convinced it won't race with ioctl().
Signed-off-by: Jonathan Corbet <corbet@lwn.net>
#include <linux/timer.h>
#include <linux/ioport.h>
#include <linux/major.h>
+#include <linux/smp_lock.h>
#include <asm/uaccess.h>
#include <asm/io.h>
unsigned minor = iminor(inode);
int ret;
+ lock_kernel();
spin_lock(&bpp_open_lock);
ret = 0;
if (minor >= BPP_NO) {
}
}
spin_unlock(&bpp_open_lock);
+ unlock_kernel();
return ret;
}