[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20180515231935.GA208042@joelaf.mtv.corp.google.com>
Date: Tue, 15 May 2018 16:19:35 -0700
From: Joel Fernandes <joel@...lfernandes.org>
To: linux-kernel@...r.kernel.org
Subject: Re: [PATCH v7 1/6] softirq: reorder trace_softirqs_on to prevent
lockdep splat
This patch submission got completely screwed up, sorry, please ignore. I'll
repost soon. There's something messed up with my SMTP server too.
On Tue, May 15, 2018 at 03:45:54PM -0700, Joel Fernandes (Google) wrote:
> I'm able to reproduce a lockdep splat with config options:
> CONFIG_PROVE_LOCKING=y,
> CONFIG_DEBUG_LOCK_ALLOC=y and
> CONFIG_PREEMPTIRQ_EVENTS=y
>
> $ echo 1 > /d/tracing/events/preemptirq/preempt_enable/enable
> ---
> kernel/softirq.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/kernel/softirq.c b/kernel/softirq.c
> index 177de3640c78..8a040bcaa033 100644
> --- a/kernel/softirq.c
> +++ b/kernel/softirq.c
> @@ -139,9 +139,13 @@ static void __local_bh_enable(unsigned int cnt)
> {
> lockdep_assert_irqs_disabled();
>
> + if (preempt_count() == cnt)
> + trace_preempt_on(CALLER_ADDR0, get_lock_parent_ip());
> +
> if (softirq_count() == (cnt & SOFTIRQ_MASK))
> trace_softirqs_on(_RET_IP_);
> - preempt_count_sub(cnt);
> +
> + __preempt_count_sub(cnt);
> }
>
> /*
> --
> 2.17.0.441.gb46fe60e1d-goog
>
Powered by blists - more mailing lists