]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
USB: cdc-acm: fix potential null-pointer dereference on disconnect
authorJohan Hovold <jhovold@gmail.com>
Tue, 22 Mar 2011 10:12:11 +0000 (11:12 +0100)
committerAK <andi@firstfloor.org>
Thu, 31 Mar 2011 18:58:47 +0000 (11:58 -0700)
commit6526452b56265b15e331004e3f3cc7f271bd4cd0
tree95c1748cc4aae62481daa619b27dabd787efe663
parentdecdbcebb0bbb9b05858086131afc69b8a8da01e
USB: cdc-acm: fix potential null-pointer dereference on disconnect

commit 7e7797e7f6f7bfab73fca02c65e40eaa5bb9000c upstream.

Fix potential null-pointer exception on disconnect introduced by commit
11ea859d64b69a747d6b060b9ed1520eab1161fe (USB: additional power savings
for cdc-acm devices that support remote wakeup).

Only access acm->dev after making sure it is non-null in control urb
completion handler.

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>
drivers/usb/class/cdc-acm.c