Re: [PATCH] perf_counter: fix double list iteration

From: Brice Goglin
Date: Thu Aug 06 2009 - 12:32:46 EST


Tested-by: Brice Goglin <Brice.Goglin@xxxxxxxx>

Thanks!


Peter Zijlstra wrote:
> ---
> Subject: perf_counter: fix double list iteration
>
> A silly copy-paste resulted in a messed up iteration which would cause
> an OOPS.
>
> Reported-by: Brice Goglin <Brice.Goglin@xxxxxxxx>
> Signed-off-by: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
> ---
> kernel/perf_counter.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/kernel/perf_counter.c b/kernel/perf_counter.c
> index 06d210c..6da7611 100644
> --- a/kernel/perf_counter.c
> +++ b/kernel/perf_counter.c
> @@ -1104,7 +1104,7 @@ static void perf_counter_sync_stat(struct perf_counter_context *ctx,
> __perf_counter_sync_stat(counter, next_counter);
>
> counter = list_next_entry(counter, event_entry);
> - next_counter = list_next_entry(counter, event_entry);
> + next_counter = list_next_entry(next_counter, event_entry);
> }
> }
>
>
>

--
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/