mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 01:10:04 +00:00
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
1 changed files with 2 additions and 0 deletions
|
@ -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 a new issue