usb: wusbcore: fix kernel panic on HWA unplug
authorThomas Pugliese <thomas.pugliese@gmail.com>
Fri, 28 Feb 2014 20:31:55 +0000 (14:31 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 1 Mar 2014 00:13:09 +0000 (16:13 -0800)
commit618836cc3478aec3dc9a60488bfd43ca93a322bd
treed43998e5913e7c21bfc0ed122cf8bd08df74e063
parentf080a51bef2caa9b0f647dc430bc608d5723ac29
usb: wusbcore: fix kernel panic on HWA unplug

This patch adds ref counting to sections of code that operate on struct
wa_xfer objects that were missing it.  Specifically, error handling
cases need to be protected from freeing the xfer while it is still in
use elsewhere.  This fixes a kernel panic that can occur when pulling
the HWA dongle while data is being transferred to a wireless device.

Signed-off-by: Thomas Pugliese <thomas.pugliese@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/wusbcore/wa-xfer.c