mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-24 05:04:00 +08:00
tty: Fix a kref leak in the HSO driver on re-open
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
a9fec7102f
commit
fe41cbb164
@ -1297,6 +1297,7 @@ static int hso_serial_open(struct tty_struct *tty, struct file *filp)
|
|||||||
/* setup */
|
/* setup */
|
||||||
spin_lock_irq(&serial->serial_lock);
|
spin_lock_irq(&serial->serial_lock);
|
||||||
tty->driver_data = serial;
|
tty->driver_data = serial;
|
||||||
|
tty_kref_put(serial->tty);
|
||||||
serial->tty = tty_kref_get(tty);
|
serial->tty = tty_kref_get(tty);
|
||||||
spin_unlock_irq(&serial->serial_lock);
|
spin_unlock_irq(&serial->serial_lock);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user