All of lore.kernel.org
 help / color / mirror / Atom feed
From: teigland@sourceware.org <teigland@sourceware.org>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] cluster/cman-kernel/src sm_message.c
Date: 2 Oct 2007 20:40:49 -0000	[thread overview]
Message-ID: <20071002204049.26444.qmail@sourceware.org> (raw)

CVSROOT:	/cvs/cluster
Module name:	cluster
Branch: 	RHEL4
Changes by:	teigland at sourceware.org	2007-10-02 20:40:48

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

Log message:
	bz 199433
	
	The bad pointer dereferences aren't in process_messages() as the oops
	message shows, but in another function that's been inlined.  I think
	it's likely that process_leave_request() (or possibly
	process_join_request) are getting a NULL "sev" struct and using it.

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

--- cluster/cman-kernel/src/Attic/sm_message.c	2007/08/14 17:05:10	1.4.2.4
+++ cluster/cman-kernel/src/Attic/sm_message.c	2007/10/02 20:40:47	1.4.2.5
@@ -389,6 +389,15 @@
 		 */
 
 		if (test_bit(SGFL_SEVENT, &sg->flags)) {
+
+			/* not sure how/when this happens */
+			if (!sg->sevent) {
+				log_print("process_join_request from %d "
+					  "sevent flag no struct", nodeid);
+				reply.ms_status = STATUS_NEG;
+				goto send;
+			}
+
 			sev = sg->sevent;
 
 			/*
@@ -581,6 +590,15 @@
 
 		else if (test_bit(SGFL_SEVENT, &sg->flags) &&
 			 nodeid != sm_our_nodeid) {
+
+			/* not sure how/when this happens */
+			if (!sg->sevent) {
+				log_print("process_leave_request from %d "
+					  "sevent flag no struct", nodeid);
+				reply.ms_status = STATUS_NEG;
+				goto out;
+			}
+
 			sev = sg->sevent;
 
 			/*
@@ -625,7 +643,7 @@
 		}
 
 	}
-
+ out:
 	smsg_bswap_out(&reply);
 	send_nodeid_message((char *) &reply, sizeof(reply), nodeid);
 }



             reply	other threads:[~2007-10-02 20:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-02 20:40 teigland [this message]
  -- strict thread matches above, loose matches on Subject: below --
2007-08-14 17:05 [Cluster-devel] cluster/cman-kernel/src sm_message.c teigland
2006-12-01 20:43 teigland
2006-12-01 20:40 teigland
2006-09-21 15:46 teigland

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20071002204049.26444.qmail@sourceware.org \
    --to=teigland@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.