diff options
author | Johan Hovold <jhovold@gmail.com> | 2011-03-22 11:12:10 +0100 |
---|---|---|
committer | AK <andi@firstfloor.org> | 2011-03-31 11:58:47 -0700 |
commit | decdbcebb0bbb9b05858086131afc69b8a8da01e (patch) | |
tree | 17a7498a2676c3b7c0086536838013cde51fbae6 | |
parent | 6fff16ce9d1cf7aa4dc2b07410e338e04bc47582 (diff) |
USB: cdc-acm: fix potential null-pointer dereference
commit 15e5bee33ffc11d0e5c6f819a65e7881c5c407be upstream.
Must check return value of tty_port_tty_get.
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
-rw-r--r-- | drivers/usb/class/cdc-acm.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index 96500e90de3..3db3eaa11c1 100644 --- a/drivers/usb/class/cdc-acm.c +++ b/drivers/usb/class/cdc-acm.c @@ -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); } |