cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
* [Cluster-devel] [PATCH] rgmanager: Fix short read handling while loading resource rules
@ 2008-01-30 18:58 Lon Hohberger
  0 siblings, 0 replies; only message in thread
From: Lon Hohberger @ 2008-01-30 18:58 UTC (permalink / raw)
  To: cluster-devel.redhat.com

If a short read occurs (maybe due to a race between the parent/child
processes in SMP systems?) while reading from the pipe while using
resource rules, we break the loop early even if there's more data to be
had at a later time.

It fixed the problem for the reporter.

-- Lon

Index: resrules.c
===================================================================
RCS file: /cvs/cluster/cluster/rgmanager/src/daemons/resrules.c,v
retrieving revision 1.16.2.9
diff -u -r1.16.2.9 resrules.c
--- resrules.c	18 Dec 2007 17:52:56 -0000	1.16.2.9
+++ resrules.c	30 Jan 2008 18:35:14 -0000
@@ -906,7 +906,7 @@
 		if (n == 0 && (!*length))
 			return 0;
 
-		if (n != sizeof(buf)) {
+		if (n == 0) {
 			done = 1;
 		}
 




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-01-30 18:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-30 18:58 [Cluster-devel] [PATCH] rgmanager: Fix short read handling while loading resource rules Lon Hohberger

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).