[Patch] statistics infrastructure - update 4

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

 



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 <[email protected]>
---

 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux