lkml.org 
[lkml]   [2023]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: WARNING: locking bug in pgd_free
From

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

\
 
 \ /
  Last update: 2023-03-26 23:54    [W:0.023 / U:0.432 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site