printer gadget: BKL pushdown
Add explicit lock_kernel() calls to printer_open() Signed-off-by: Jonathan Corbet <corbet@lwn.net>
This commit is contained in:
Родитель
26ce4f0684
Коммит
b2f2ba01b2
|
@ -462,6 +462,7 @@ printer_open(struct inode *inode, struct file *fd)
|
|||
unsigned long flags;
|
||||
int ret = -EBUSY;
|
||||
|
||||
lock_kernel();
|
||||
dev = container_of(inode->i_cdev, struct printer_dev, printer_cdev);
|
||||
|
||||
spin_lock_irqsave(&dev->lock, flags);
|
||||
|
@ -477,7 +478,7 @@ printer_open(struct inode *inode, struct file *fd)
|
|||
spin_unlock_irqrestore(&dev->lock, flags);
|
||||
|
||||
DBG(dev, "printer_open returned %x\n", ret);
|
||||
|
||||
unlock_kernel();
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче