You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -179,7 +179,6 @@ static int __init ttyprintk_init(void)
|
||||
{
|
||||
int ret = -ENOMEM;
|
||||
|
||||
tpk_port.port.ops = &null_ops;
|
||||
mutex_init(&tpk_port.port_write_mutex);
|
||||
|
||||
ttyprintk_driver = tty_alloc_driver(1,
|
||||
@@ -190,6 +189,7 @@ static int __init ttyprintk_init(void)
|
||||
return PTR_ERR(ttyprintk_driver);
|
||||
|
||||
tty_port_init(&tpk_port.port);
|
||||
tpk_port.port.ops = &null_ops;
|
||||
|
||||
ttyprintk_driver->driver_name = "ttyprintk";
|
||||
ttyprintk_driver->name = "ttyprintk";
|
||||
|
||||
Reference in New Issue
Block a user