USB: gadget: rndis: Flush rx_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. This could cause NULL
pointer access later. Hence flush rx_work before freeing net
device during cleanup to fix the issue.
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>
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
2 files changed