From: Martin Peschke 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. Signed-off-by: Martin Peschke Signed-off-by: Andrew Morton --- lib/statistic.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff -puN lib/statistic.c~statistics-infrastructure-update-4 lib/statistic.c --- a/lib/statistic.c~statistics-infrastructure-update-4 +++ a/lib/statistic.c @@ -721,12 +721,7 @@ static int statistic_def_close(struct in 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 @@ static int statistic_def_close(struct in } } } +out: if (!list_empty(&line_lh)) statistic_parse(interface, &line_lh, line_size); return statistic_generic_close(inode, file); _