public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Waiman Long <longman@redhat.com>
To: Sanan Hasanov <sanan.hasanov@Knights.ucf.edu>,
	"peterz@infradead.org" <peterz@infradead.org>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"will@kernel.org" <will@kernel.org>,
	"boqun.feng@gmail.com" <boqun.feng@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: "contact@pgazz.com" <contact@pgazz.com>,
	"syzkaller@googlegroups.com" <syzkaller@googlegroups.com>
Subject: Re: WARNING: locking bug in pgd_free
Date: Tue, 24 Jan 2023 12:58:03 -0500	[thread overview]
Message-ID: <b2962bcd-c35f-26dd-cb4e-8bc7e2807ca2@redhat.com> (raw)
In-Reply-To: <IA1PR07MB98304A14BD26596C87A8C581ABC99@IA1PR07MB9830.namprd07.prod.outlook.com>


On 1/24/23 11:22, Sanan Hasanov wrote:
> Good day, dear maintainers,
>
> We found a bug using a modified kernel configuration file used by syzbot.
>
> We enhanced the coverage of the configuration file using our tool, klocalizer.
>
> Kernel Branch: 6.2.0-rc3-next-20230112
> Kernel config: https://drive.google.com/file/d/1Zg-NZ5s04wPVdO8cfpvQjatI-0VAVjZV/view?usp=sharing
>
> Unfortunately, we do not have a reproducer yet.
>
> Thank you!
>
> Best regards,
> Sanan Hasanov
>
> ------------[ cut here ]------------
> DEBUG_LOCKS_WARN_ON(1)
> WARNING: CPU: 5 PID: 7278 at kernel/locking/lockdep.c:232 hlock_class kernel/locking/lockdep.c:232 [inline]
> WARNING: CPU: 5 PID: 7278 at kernel/locking/lockdep.c:232 hlock_class kernel/locking/lockdep.c:221 [inline]
> WARNING: CPU: 5 PID: 7278 at kernel/locking/lockdep.c:232 check_deadlock kernel/locking/lockdep.c:3017 [inline]
> WARNING: CPU: 5 PID: 7278 at kernel/locking/lockdep.c:232 validate_chain kernel/locking/lockdep.c:3819 [inline]
> WARNING: CPU: 5 PID: 7278 at kernel/locking/lockdep.c:232 __lock_acquire+0x24b8/0x5170 kernel/locking/lockdep.c:5056
> Modules linked in:
> CPU: 5 PID: 7278 Comm: systemd-udevd Not tainted 6.2.0-rc3-next-20230112 #1
> Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
> RIP: 0010:hlock_class kernel/locking/lockdep.c:232 [inline]
> RIP: 0010:hlock_class kernel/locking/lockdep.c:221 [inline]
> RIP: 0010:check_deadlock kernel/locking/lockdep.c:3017 [inline]
> RIP: 0010:validate_chain kernel/locking/lockdep.c:3819 [inline]
> RIP: 0010:__lock_acquire+0x24b8/0x5170 kernel/locking/lockdep.c:5056

This error only happens when the lock class used has been freed 
(zapped). A lock class can be freed by either lockdep_unregister_key() 
or by lockdep_reset_lock(). The lock in question is a static pgd_lock 
defined in arch/x86/mm/fault.c. lockdep_unregister_key() is for 
dynamically allocated key which is not the case for pgd_lock. 
lockdep_reset_lock() is used by locking_selftest.c only. Does your 
config include CONFIG_DEBUG_LOCKING_API_SELFTESTS?

Cheers,
Longman


      reply	other threads:[~2023-01-24 17:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-24 16:22 WARNING: locking bug in pgd_free Sanan Hasanov
2023-01-24 17:58 ` Waiman Long [this message]

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=b2962bcd-c35f-26dd-cb4e-8bc7e2807ca2@redhat.com \
    --to=longman@redhat.com \
    --cc=boqun.feng@gmail.com \
    --cc=contact@pgazz.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=sanan.hasanov@Knights.ucf.edu \
    --cc=syzkaller@googlegroups.com \
    --cc=will@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