cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH 1/3] dlm: check if workqueues are NULL before destroying
@ 2019-01-08 15:08 David Windsor
  2019-01-08 15:08 ` [Cluster-devel] [PATCH 2/3] dlm: add TCP multihoming/failover support David Windsor
  2019-01-08 15:08 ` [Cluster-devel] [PATCH 3/3] dlm: allow binding to all network interfaces David Windsor
  0 siblings, 2 replies; 3+ messages in thread
From: David Windsor @ 2019-01-08 15:08 UTC (permalink / raw)
  To: cluster-devel.redhat.com

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 <dwindsor@redhat.com>
---
 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



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

end of thread, other threads:[~2019-01-08 15:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-08 15:08 [Cluster-devel] [PATCH 1/3] dlm: check if workqueues are NULL before destroying David Windsor
2019-01-08 15:08 ` [Cluster-devel] [PATCH 2/3] dlm: add TCP multihoming/failover support David Windsor
2019-01-08 15:08 ` [Cluster-devel] [PATCH 3/3] dlm: allow binding to all network interfaces David Windsor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).