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>
This commit is contained in:
parent
23b80550e2
commit
15e5bee33f
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue