* [PATCH net] amt: cancel delayed_work synchronously in amt_fini()
@ 2021-11-16 16:09 Taehee Yoo
2021-11-17 3:30 ` patchwork-bot+netdevbpf
0 siblings, 1 reply; 2+ messages in thread
From: Taehee Yoo @ 2021-11-16 16:09 UTC (permalink / raw)
To: davem, kuba, netdev; +Cc: ap420073
When the amt module is being removed, it calls cancel_delayed_work()
to cancel pending delayed_work. But this function doesn't wait for
canceling delayed_work.
So, workers can be still doing after module delete.
In order to avoid this, cancel_delayed_work_sync() should be used instead.
Suggested-by: Jakub Kicinski <kuba@kernel.org>
Fixes: bc54e49c140b ("amt: add multicast(IGMP) report message handler")
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
---
drivers/net/amt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/amt.c b/drivers/net/amt.c
index 47a04c330885..b732ee9a50ef 100644
--- a/drivers/net/amt.c
+++ b/drivers/net/amt.c
@@ -3286,7 +3286,7 @@ static void __exit amt_fini(void)
{
rtnl_link_unregister(&amt_link_ops);
unregister_netdevice_notifier(&amt_notifier_block);
- cancel_delayed_work(&source_gc_wq);
+ cancel_delayed_work_sync(&source_gc_wq);
__amt_source_gc_work();
destroy_workqueue(amt_wq);
}
--
2.17.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH net] amt: cancel delayed_work synchronously in amt_fini()
2021-11-16 16:09 [PATCH net] amt: cancel delayed_work synchronously in amt_fini() Taehee Yoo
@ 2021-11-17 3:30 ` patchwork-bot+netdevbpf
0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-11-17 3:30 UTC (permalink / raw)
To: Taehee Yoo; +Cc: davem, kuba, netdev
Hello:
This patch was applied to netdev/net.git (master)
by Jakub Kicinski <kuba@kernel.org>:
On Tue, 16 Nov 2021 16:09:23 +0000 you wrote:
> When the amt module is being removed, it calls cancel_delayed_work()
> to cancel pending delayed_work. But this function doesn't wait for
> canceling delayed_work.
> So, workers can be still doing after module delete.
>
> In order to avoid this, cancel_delayed_work_sync() should be used instead.
>
> [...]
Here is the summary with links:
- [net] amt: cancel delayed_work synchronously in amt_fini()
https://git.kernel.org/netdev/net/c/b0024a04e488
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-11-17 3:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-16 16:09 [PATCH net] amt: cancel delayed_work synchronously in amt_fini() Taehee Yoo
2021-11-17 3:30 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).