[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACqU3MUghvskv4HrVn+w7rCTki0RkRwQfFUaaysHYOqB6V+q4A@mail.gmail.com>
Date: Tue, 26 Jul 2011 16:12:35 -0400
From: Arnaud Lacombe <lacombar@...il.com>
To: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Ingo Molnar <mingo@...e.hu>,
Linus Torvalds <torvalds@...ux-foundation.org>,
linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
Andrew Morton <akpm@...ux-foundation.org>,
SergeySenozhatsky <sergey.senozhatsky@...il.com>,
DaveJones <davej@...hat.com>
Subject: Re: [GIT PULL] core/printk changes for v3.1
Hi,
On Tue, Jul 26, 2011 at 7:28 AM, Peter Zijlstra <a.p.zijlstra@...llo.nl> wrote:
> On Mon, 2011-07-25 at 14:20 -0400, Arnaud Lacombe wrote:
>
>> > Peter Zijlstra (3):
>> > [...]
>> > lockdep: Fix trace_[soft,hard]irqs_[on,off]() recursion
>> >
>> This commit is triggering:
>>
>> WARNING: at /src/linux/linux/kernel/lockdep.c:2529
>
> Not actually having reproduced the problem, does the below cure things?
>
> ---
> Subject: lockdep: Fix trace_hardirqs_on_caller()
> From: Peter Zijlstra <a.p.zijlstra@...llo.nl>
> Date: Tue Jul 26 13:13:44 CEST 2011
>
> Commit dd4e5d3ac4a ("lockdep: Fix trace_[soft,hard]irqs_[on,off]()
> recursion") made a bit of a mess of the various checks and error
> conditions.
>
> In particular it moved the check for !irqs_disabled() before the
> spurious enable test, resulting in some warnings.
>
> Reported-by: Arnaud Lacombe <lacombar@...il.com>
> Reported-by: Dave Jones <davej@...hat.com>
> Reported-by: Sergey Senozhatsky <sergey.senozhatsky@...il.com>
> Signed-off-by: Peter Zijlstra <a.p.zijlstra@...llo.nl>
The patch has been a bit difficult to apply[0], but the warning no
longer happen once done, thanks.
Tested-by: Arnaud Lacombe <lacombar@...il.com>
- Arnaud
[0]: I still have to find an easy way to transfer patch between gmail
and my tree... For now, I ruled out mutt as it mangle the patch...
> ---
> kernel/lockdep.c | 30 ++++++++++++++++--------------
> 1 file changed, 16 insertions(+), 14 deletions(-)
> Index: linux-2.6/kernel/lockdep.c
> ===================================================================
> --- linux-2.6.orig/kernel/lockdep.c
> +++ linux-2.6/kernel/lockdep.c
> @@ -2485,23 +2485,9 @@ static void __trace_hardirqs_on_caller(u
> {
> struct task_struct *curr = current;
>
> - if (DEBUG_LOCKS_WARN_ON(unlikely(early_boot_irqs_disabled)))
> - return;
> -
> - if (unlikely(curr->hardirqs_enabled)) {
> - /*
> - * Neither irq nor preemption are disabled here
> - * so this is racy by nature but losing one hit
> - * in a stat is not a big deal.
> - */
> - __debug_atomic_inc(redundant_hardirqs_on);
> - return;
> - }
> /* we'll do an OFF -> ON transition: */
> curr->hardirqs_enabled = 1;
>
> - if (DEBUG_LOCKS_WARN_ON(current->hardirq_context))
> - return;
> /*
> * We are going to turn hardirqs on, so set the
> * usage bit for all held locks:
> @@ -2529,9 +2515,25 @@ void trace_hardirqs_on_caller(unsigned l
> if (unlikely(!debug_locks || current->lockdep_recursion))
> return;
>
> + if (unlikely(current->hardirqs_enabled)) {
> + /*
> + * Neither irq nor preemption are disabled here
> + * so this is racy by nature but losing one hit
> + * in a stat is not a big deal.
> + */
> + __debug_atomic_inc(redundant_hardirqs_on);
> + return;
> + }
> +
> if (DEBUG_LOCKS_WARN_ON(!irqs_disabled()))
> return;
>
> + if (DEBUG_LOCKS_WARN_ON(unlikely(early_boot_irqs_disabled)))
> + return;
> +
> + if (DEBUG_LOCKS_WARN_ON(current->hardirq_context))
> + return;
> +
> current->lockdep_recursion = 1;
> __trace_hardirqs_on_caller(ip);
> current->lockdep_recursion = 0;
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists