mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: syzbot <syzbot+42bc0d31b9a21faebdf8@syzkaller.appspotmail.com>
Cc: andreyknvl@google.com, bp@alien8.de, devel@etsukata.com,
	hpa@zytor.com, linux-kernel@vger.kernel.org,
	linux-usb@vger.kernel.org, mingo@redhat.com,
	syzkaller-bugs@googlegroups.com, tglx@linutronix.de,
	viro@zeniv.linux.org.uk, x86@kernel.org
Subject: Re: INFO: trying to register non-static key in is_dynamic_key
Date: Fri, 19 Jun 2020 11:53:42 +0200	[thread overview]
Message-ID: <20200619095342.GT576905@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <00000000000004a76305a8624d22@google.com>

On Thu, Jun 18, 2020 at 02:17:15PM -0700, syzbot wrote:

> INFO: trying to register non-static key.
> the code is fine but needs lockdep annotation.
> turning off the locking correctness validator.
> CPU: 0 PID: 0 Comm: swapper/0 Not tainted 5.7.0-syzkaller #0
> Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
> Call Trace:
>  <IRQ>
>  __dump_stack lib/dump_stack.c:77 [inline]
>  dump_stack+0xf6/0x16e lib/dump_stack.c:118
>  assign_lock_key kernel/locking/lockdep.c:894 [inline]
>  register_lock_class+0x1442/0x17e0 kernel/locking/lockdep.c:1206
>  arch_stack_walk+0x81/0xf0 arch/x86/kernel/stacktrace.c:25
>  lock_downgrade+0x720/0x720 kernel/locking/lockdep.c:4624
>  is_dynamic_key+0x1b0/0x1b0 kernel/locking/lockdep.c:1176
>  trace_hardirqs_off+0x50/0x1f0 kernel/trace/trace_preemptirq.c:83
>  __lock_acquire+0x101/0x6270 kernel/locking/lockdep.c:4259
>  save_stack+0x32/0x40 mm/kasan/common.c:50

So I'm thinking this is in fact:

	spin_lock_irqsave(&depot_lock, flags);

from lib/stackdepot.c:stack_depot_save(), which has gone missing from
the stack due to tail-call optimizations.

Now depot_lock is declared thusly:

  static DEFINE_SPINLOCK(depot_lock);

and I'm trying to figure out how lockdep manages to conclude that isn't
static storage.... most odd.

  parent reply	other threads:[~2020-06-19  9:54 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-18 21:17 syzbot
2020-06-19  7:05 ` Greg KH
2020-06-19  7:35   ` Dmitry Vyukov
2020-06-19  7:47     ` Greg KH
2020-06-19  9:11       ` Dmitry Vyukov
2020-06-19  9:53 ` Peter Zijlstra [this message]
2020-06-19 10:03   ` Dmitry Vyukov
2020-06-19 13:39     ` Andrey Konovalov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200619095342.GT576905@hirez.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=andreyknvl@google.com \
    --cc=bp@alien8.de \
    --cc=devel@etsukata.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=syzbot+42bc0d31b9a21faebdf8@syzkaller.appspotmail.com \
    --cc=syzkaller-bugs@googlegroups.com \
    --cc=tglx@linutronix.de \
    --cc=viro@zeniv.linux.org.uk \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome