mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
ocelot: Cancel delayed work before wq destruction
[ Upstream commitc5d139697d] Make sure the delayed work for stats update is not pending before wq destruction. This fixes the module unload path. The issue is there since day 1. Fixes:a556c76adc("net: mscc: Add initial Ocelot switch support") Signed-off-by: Claudiu Manoil <claudiu.manoil@nxp.com> Reviewed-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
cd7f02feca
commit
eaa34bd4f7
@@ -1767,6 +1767,7 @@ EXPORT_SYMBOL(ocelot_init);
|
||||
|
||||
void ocelot_deinit(struct ocelot *ocelot)
|
||||
{
|
||||
cancel_delayed_work(&ocelot->stats_work);
|
||||
destroy_workqueue(ocelot->stats_queue);
|
||||
mutex_destroy(&ocelot->stats_lock);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user