RDMA/core: Flush workqueue before destroy it
PATCH 1/1 RDMA/core: Flush workqueue before destroy it
From: Yixian Liu <[email protected]>
It is safer to flush the workqueue before destroying it.
Signed-off-by Yixian Liu <[email protected]>
Signed-off-by Weihang Li <[email protected]>
--- drivers/infiniband/core/addr.c | 1 + 1 file changed, 1 insertion(+)
drivers/infiniband/core/addr.c +1 -0
@@ -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)); }
Signature · 1 line
2.8.1
Quoted 3 lines · Weihang Li
From: Yixian Liu <[email protected]>
It is safer to flush the workqueue before destroying it.
Sorry, safer for what?
destroy_workqueue() flushes workqueue internally. There is no need to do it twice.
Thanks
Quoted 22 lines
Signed-off-by Yixian Liu <[email protected]>Signed-off-by Weihang Li <[email protected]>--- drivers/infiniband/core/addr.c | 1 + 1 file changed, 1 insertion(+)drivers/infiniband/core/addr.c +1
-0@@ -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)); }Signature · 1 line
2.8.1
Quoted 11 lines · Leon Romanovsky
Quoted 3 lines · Weihang Li
From: Yixian Liu <[email protected]>
It is safer to flush the workqueue before destroying it.
Sorry, safer for what?
destroy_workqueue()flushes workqueue internally. There is no need to do it twice.Thanks
My bad, thank you for reminding :)
Weihang