aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/lp.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-05-27 10:40:19 +0900
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-05-27 10:40:19 +0900
commitf35c69b736e4f910d7447346980145212c283570 (patch)
tree824b90cd870e6de07bbba19d761c1c74cf1fb4a7 /drivers/char/lp.c
parentuio/uio_pci_generic: Use module_pci_driver to register driver (diff)
parentLinux 3.10-rc3 (diff)
downloadlinux-dev-f35c69b736e4f910d7447346980145212c283570.tar.xz
linux-dev-f35c69b736e4f910d7447346980145212c283570.zip
Merge 3.10-rc3 into char-misc-next
We want the changes in here. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/char/lp.c')
-rw-r--r--drivers/char/lp.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/char/lp.c b/drivers/char/lp.c
index dafd9ac6428f..0913d79424d3 100644
--- a/drivers/char/lp.c
+++ b/drivers/char/lp.c
@@ -622,9 +622,12 @@ static int lp_do_ioctl(unsigned int minor, unsigned int cmd,
return -EFAULT;
break;
case LPGETSTATUS:
+ if (mutex_lock_interruptible(&lp_table[minor].port_mutex))
+ return -EINTR;
lp_claim_parport_or_block (&lp_table[minor]);
status = r_str(minor);
lp_release_parport (&lp_table[minor]);
+ mutex_unlock(&lp_table[minor].port_mutex);
if (copy_to_user(argp, &status, sizeof(int)))
return -EFAULT;