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:
committed by
Greg Kroah-Hartman
parent
23b80550e2
commit
15e5bee33f
@@ -533,6 +533,8 @@ static void acm_softint(struct work_struct *work)
|
|||||||
if (!ACM_READY(acm))
|
if (!ACM_READY(acm))
|
||||||
return;
|
return;
|
||||||
tty = tty_port_tty_get(&acm->port);
|
tty = tty_port_tty_get(&acm->port);
|
||||||
|
if (!tty)
|
||||||
|
return;
|
||||||
tty_wakeup(tty);
|
tty_wakeup(tty);
|
||||||
tty_kref_put(tty);
|
tty_kref_put(tty);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user