diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-23 09:26:32 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-05-23 09:26:32 -0700 |
commit | 5cc0c03823ca18c490f8223f85ed40f2a9d936c4 (patch) | |
tree | a05b7a2a1153efff01a78dc54e2102420e2c29bb /drivers/char/lp.c | |
parent | b64194068bbbdef3cc235f5459616a330f3b7724 (diff) | |
parent | b5325a02aa84c794cf520d6d68cae4b150988a32 (diff) |
Merge tag 'char-misc-3.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char/misc driver fixes from Greg Kroah-Hartman:
"Here are some small char/misc driver fixes for 3.10-rc2.
Nothing major here, just a number of fixes for things that people have
reported, and a MAINTAINERS update for the recent changes for the
hyperv files that went into 3.10-rc1."
* tag 'char-misc-3.10-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
ttyprintk: Fix NULL pointer deref by setting tty_port ops after initializing port
uio: UIO_DMEM_GENIRQ should depend on HAS_DMA
MAINTAINERS: update Hyper-V file list
mei: bus: Reset event_cb when disabling a device
Drivers: hv: Fix a bug in get_vp_index()
mei: fix out of array access to me clients array
Char: lp, protect LPGETSTATUS with port_mutex
dummy-irq: require the user to specify an IRQ number
Diffstat (limited to 'drivers/char/lp.c')
-rw-r--r-- | drivers/char/lp.c | 3 |
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; |