USB: gadget: rndis: Flush rx_work & tx_work before free_net_dev in cleanup
gether_cleanup() gets called during unbind() and as part of cleanup,
driver flushes work pending and freeing net device. But it is not flushing
pending rx_work & tx_work. This could cause later and result in crash.
Hence flush both rx_work & tx_work before freeing net device during cleanup
to fix the issue. Also add check for port_usb in rx_fill() to bail out in
case disconnect happened already.
Also get rndis value from global pointer __rndis under spin lock in
rndis_command_complete/rndis_response_complete callbacks.
Change-Id: Ic2813cf0fff670c12e532b915f6ef2c71df17ddc
Signed-off-by:
Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Loading
Please register or sign in to comment