On Tue, Apr 06, 2021 at 04:34:51PM +0800, Weihang Li wrote: > From: Yixian Liu <liuyixian@xxxxxxxxxx> > > 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 > > Signed-off-by: Yixian Liu <liuyixian@xxxxxxxxxx> > Signed-off-by: Weihang Li <liweihang@xxxxxxxxxx> > --- > 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 >