diff options
author | Dan Carpenter <error27@gmail.com> | 2011-02-28 22:28:31 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-02-28 13:21:20 -0800 |
commit | c976cc3aa99e813084fc4bd295c9f7b706738b48 (patch) | |
tree | eee120b3cbbcf3bca9b9a5e6dea6d9441f516ec0 /drivers/staging/generic_serial | |
parent | 2c590f3ca99c193a04fe90ec89046138b66fcc1e (diff) |
Staging: generic_serial: fix double locking bug
spin_lock_irqsave() is not nestable. The second time that it gets
called it overwrites the "flags" variable and so IRQs can't be restored
properly.
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/generic_serial')
-rw-r--r-- | drivers/staging/generic_serial/generic_serial.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/generic_serial/generic_serial.c b/drivers/staging/generic_serial/generic_serial.c index 5954ee1dc953..466988dbc37d 100644 --- a/drivers/staging/generic_serial/generic_serial.c +++ b/drivers/staging/generic_serial/generic_serial.c @@ -566,9 +566,9 @@ void gs_close(struct tty_struct * tty, struct file * filp) * line status register. */ - spin_lock_irqsave(&port->driver_lock, flags); + spin_lock(&port->driver_lock); port->rd->disable_rx_interrupts (port); - spin_unlock_irqrestore(&port->driver_lock, flags); + spin_unlock(&port->driver_lock); spin_unlock_irqrestore(&port->port.lock, flags); /* close has no way of returning "EINTR", so discard return value */ |