[patch 01/12] dlm: fix lowcomms race

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Fix potential race in lowcomms.

Signed-off-by: Patrick Caulfield <[email protected]>
Signed-off-by: David Teigland <[email protected]>

Index: linux-2.6.12-mm1/drivers/dlm/lowcomms.c
===================================================================
--- linux-2.6.12-mm1.orig/drivers/dlm/lowcomms.c
+++ linux-2.6.12-mm1/drivers/dlm/lowcomms.c
@@ -1101,8 +1101,8 @@ static void process_output_queue(void)
 	list_for_each_safe(list, temp, &write_nodes) {
 		struct nodeinfo *ni =
 		    list_entry(list, struct nodeinfo, write_list);
-		list_del(&ni->write_list);
 		clear_bit(NI_WRITE_PENDING, &ni->flags);
+		list_del(&ni->write_list);
 
 		spin_unlock_bh(&write_nodes_lock);
 
@@ -1271,11 +1271,7 @@ static int daemons_start(void)
 
 /*
  * This is quite likely to sleep...
- * Temporarily initialise the waitq head so that lowcomms_send_message
- * doesn't crash if it gets called before the thread is fully
- * initialised
  */
-
 int dlm_lowcomms_start(void)
 {
 	int error;

--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]
  Powered by Linux