From: Sagi Grimberg Date: Mon, 19 May 2014 14:44:25 +0000 (+0300) Subject: Target/iser: Wait for proper cleanup before unloading X-Git-Url: http://git.mmlx.us/?a=commitdiff_plain;h=029a894631d9020b77151cfca7ecd9eda3916661;p=linux-edison.git Target/iser: Wait for proper cleanup before unloading commit f5ebec9629cf78eeeea4b8258882a9f439ab2404 upstream. disconnected_handler works are scheduled on system_wq. When attempting to unload, first make sure all works have cleaned up. Signed-off-by: Sagi Grimberg Signed-off-by: Nicholas Bellinger Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/infiniband/ulp/isert/ib_isert.c b/drivers/infiniband/ulp/isert/ib_isert.c index f86a4682f83..0e93152384f 100644 --- a/drivers/infiniband/ulp/isert/ib_isert.c +++ b/drivers/infiniband/ulp/isert/ib_isert.c @@ -2332,6 +2332,7 @@ destroy_rx_wq: static void __exit isert_exit(void) { + flush_scheduled_work(); kmem_cache_destroy(isert_cmd_cache); destroy_workqueue(isert_comp_wq); destroy_workqueue(isert_rx_wq);