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

[Cluster-devel] cluster/cman-kernel/src membership.c



CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL4
Changes by:	pcaulfield sourceware org	2007-01-18 15:08:35

Modified files:
	cman-kernel/src: membership.c 

Log message:
	Fix race that could panic if cman_kill_node() is called when we are
	shutting down.
	bz#223098

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/cluster/cman-kernel/src/membership.c.diff?cvsroot=cluster&only_with_tag=RHEL4&r1=1.44.2.24&r2=1.44.2.25

--- cluster/cman-kernel/src/Attic/membership.c	2006/06/26 08:42:06	1.44.2.24
+++ cluster/cman-kernel/src/Attic/membership.c	2007/01/18 15:08:35	1.44.2.25
@@ -1364,7 +1364,7 @@
 	 * list and wake it */
 	if (current != membership_task) {
 		struct cl_new_dead_node *newnode =
-		    kmalloc(sizeof (struct cl_new_dead_node), GFP_KERNEL);
+			kmalloc(sizeof (struct cl_new_dead_node), GFP_KERNEL);
 		if (!newnode)
 			return;
 		newnode->node = node;
@@ -1372,7 +1372,10 @@
 		list_add_tail(&newnode->list, &new_dead_node_list);
 		set_bit(WAKE_FLAG_DEADNODE, &wake_flags);
 		spin_unlock(&new_dead_node_lock);
-		wake_up_process(membership_task);
+		spin_lock(&membership_task_lock);
+		if (membership_task)
+			wake_up_process(membership_task);
+		spin_unlock(&membership_task_lock);
 		P_MEMB("Passing dead node %s onto kmembershipd\n", node->name);
 		return;
 	}


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