lkml.org 
[lkml]   [2006]   [Jun]   [17]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[Patch] statistics infrastructure - update 4
FromMartin Peschke <>
DateSat, 17 Jun 2006 11:26:55 +0200
This fixes an endless loop that might hang the statistics code
when it is parsing options. I assume it also fixes the soft
lockup reported by Wu. Please apply.

Signed-off-by: Martin Peschke <mp3@de.ibm.com>
---
 statistic.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)
--- a/lib/statistic.c	13 Jun 2006 15:14:27 -0000	1.49
+++ b/lib/statistic.c	13 Jun 2006 15:23:19 -0000	1.50
@@ -721,12 +721,7 @@
 		for (offset = 0; offset < seg->offset; offset += seg_nl->size) {
 			seg_nl = kmalloc(sizeof(struct sgrb_seg), GFP_KERNEL);
 			if (unlikely(!seg_nl))
-				/*
-				 * FIXME:
-				 * Should we omit other new settings because we
-				 * could not process this line of definitions?
-				 */
-				continue;
+				goto out;
 			seg_nl->address = seg->address + offset;
 			nl = strnchr(seg_nl->address,
 				     seg->offset - offset, '\n');
@@ -745,6 +740,7 @@
 			}
 		}
 	}
+out:
 	if (!list_empty(&line_lh))
 		statistic_parse(interface, &line_lh, line_size);
 	return statistic_generic_close(inode, file);

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

\
 
 \ /
  Last update: 2006-06-17 11:29    [from the cache]
©2003-2008