From: Jonathan Corbet Date: Fri, 16 May 2008 20:21:30 +0000 (-0600) Subject: printer gadget: BKL pushdown X-Git-Tag: v2.6.27-rc1~1103^2~92 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2f2ba01b2a4356e92231669f7e3dcee37ac2fca;p=linux-2.6 printer gadget: BKL pushdown Add explicit lock_kernel() calls to printer_open() Signed-off-by: Jonathan Corbet --- diff --git a/drivers/usb/gadget/printer.c b/drivers/usb/gadget/printer.c index 76be75e3ab..ec8f2eb041 100644 --- a/drivers/usb/gadget/printer.c +++ b/drivers/usb/gadget/printer.c @@ -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; }