[Patch] statistics infrastructure - update 4
From: Martin Peschke
Date: Sat Jun 17 2006 - 05:28:59 EST
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@xxxxxxxxxx>
---
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/