Skip to content
Commit cac4a042 authored by Kiruthika Varadarajan's avatar Kiruthika Varadarajan Committed by Greg Kroah-Hartman
Browse files

usb: gadget: ether: Fix race between gether_disconnect and rx_submit

commit d29fcf70 upstream.

On spin lock release in rx_submit, gether_disconnect get a chance to
run, it makes port_usb NULL, rx_submit access NULL port USB, hence null
pointer crash.

Fixed by releasing the lock in rx_submit after port_usb is used.

Fixes: 2b3d942c

 ("usb ethernet gadget: split out network core")
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarKiruthika Varadarajan <Kiruthika.Varadarajan@harman.com>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 449a8d08
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment