From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755310AbYKCKKz (ORCPT ); Mon, 3 Nov 2008 05:10:55 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754653AbYKCKKr (ORCPT ); Mon, 3 Nov 2008 05:10:47 -0500 Received: from mx3.mail.elte.hu ([157.181.1.138]:60625 "EHLO mx3.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754640AbYKCKKr (ORCPT ); Mon, 3 Nov 2008 05:10:47 -0500 Date: Mon, 3 Nov 2008 11:10:27 +0100 From: Ingo Molnar To: Steven Rostedt Cc: LKML , Thomas Gleixner , Peter Zijlstra , Linus Torvalds , Andrew Morton Subject: Re: [PATCH -v3] ring-buffer: add paranoid checks for loops Message-ID: <20081103101027.GG13671@elte.hu> References: <20081030184552.GC17822@elte.hu> <20081031093804.GF30317@elte.hu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) X-ELTE-VirusStatus: clean X-ELTE-SpamScore: -1.5 X-ELTE-SpamLevel: X-ELTE-SpamCheck: no X-ELTE-SpamVersion: ELTE 2.0 X-ELTE-SpamCheck-Details: score=-1.5 required=5.9 tests=BAYES_00,DNS_FROM_SECURITYSAGE autolearn=no SpamAssassin version=3.2.3 -1.5 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] 0.0 DNS_FROM_SECURITYSAGE RBL: Envelope sender in blackholes.securitysage.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Steven Rostedt wrote: > [ > Changes from v2: > > Applied Ingo's comments: > > Rephrased one of the comments. > > Renamed the "paranoid" variable into "nr_loops". > ] > > While writing a new tracer, I had a bug where I caused the ring-buffer > to recurse in a bad way. The bug was with the tracer I was writing > and not the ring-buffer itself. But it took a long time to find the > problem. > > This patch adds paranoid checks into the ring-buffer infrastructure > that will catch bugs of this nature. > > Note: I put the bug back in the tracer and this patch showed the error > nicely and prevented the lockup. > > Signed-off-by: Steven Rostedt > --- > kernel/trace/ring_buffer.c | 56 +++++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 56 insertions(+) applied to tip/tracing/urgent, thanks Steve! Ingo