1
0
Fork 0

USB: cdc-acm: fix potential null-pointer dereference

Must check return value of tty_port_tty_get.

Cc: stable <stable@kernel.org>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
hifive-unleashed-5.1
Johan Hovold 2011-03-22 11:12:10 +01:00 committed by Greg Kroah-Hartman
parent 23b80550e2
commit 15e5bee33f
1 changed files with 2 additions and 0 deletions

View File

@ -533,6 +533,8 @@ static void acm_softint(struct work_struct *work)
if (!ACM_READY(acm))
return;
tty = tty_port_tty_get(&acm->port);
if (!tty)
return;
tty_wakeup(tty);
tty_kref_put(tty);
}