From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Windsor Date: Tue, 8 Jan 2019 10:08:53 -0500 Subject: [Cluster-devel] [PATCH 1/3] dlm: check if workqueues are NULL before destroying Message-ID: <20190108150855.6410-1-dwindsor@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit If a network failure occurs before any DLM traffic can be generated, the send and receive workqueues can be NULL when work_stop() is called. Check to see if these workqueues are NULL before calling destroy_workqueue(). Signed-off-by: David Windsor --- fs/dlm/lowcomms.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index 76976d6e50f9..905cbdbd31bc 100644 --- a/fs/dlm/lowcomms.c +++ b/fs/dlm/lowcomms.c @@ -1630,8 +1630,10 @@ static void clean_writequeues(void) static void work_stop(void) { - destroy_workqueue(recv_workqueue); - destroy_workqueue(send_workqueue); + if (recv_workqueue) + destroy_workqueue(recv_workqueue); + if (send_workqueue) + destroy_workqueue(send_workqueue); } static int work_start(void) -- 2.20.1