public inbox for linux-rdma@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH for-next] RDMA/core: Flush workqueue before destroy it
@ 2021-04-06  8:34 Weihang Li
  2021-04-06  8:45 ` Leon Romanovsky
  0 siblings, 1 reply; 3+ messages in thread
From: Weihang Li @ 2021-04-06  8:34 UTC (permalink / raw)
  To: dledford, jgg; +Cc: leon, linux-rdma, linuxarm

From: Yixian Liu <liuyixian@huawei.com>

It is safer to flush the workqueue before destroying it.

Signed-off-by: Yixian Liu <liuyixian@huawei.com>
Signed-off-by: Weihang Li <liweihang@huawei.com>
---
 drivers/infiniband/core/addr.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/infiniband/core/addr.c b/drivers/infiniband/core/addr.c
index 0abce00..e58a06b 100644
--- a/drivers/infiniband/core/addr.c
+++ b/drivers/infiniband/core/addr.c
@@ -883,6 +883,7 @@ int addr_init(void)
 void addr_cleanup(void)
 {
 	unregister_netevent_notifier(&nb);
+	flush_workqueue(addr_wq);
 	destroy_workqueue(addr_wq);
 	WARN_ON(!list_empty(&req_list));
 }
-- 
2.8.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-04-06 13:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-06  8:34 [PATCH for-next] RDMA/core: Flush workqueue before destroy it Weihang Li
2021-04-06  8:45 ` Leon Romanovsky
2021-04-06 13:29   ` liweihang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox