Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 236dfe4e authored by Vijayavardhan Vennapusa's avatar Vijayavardhan Vennapusa Committed by Gerrit - the friendly Code Review server
Browse files

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: default avatarVijayavardhan Vennapusa <vvreddy@codeaurora.org>
parent 17d7bd58
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment