Hello, kernel test robot noticed "WARNING:possible_irq_lock_inversion_dependency_detected" on: commit: e3bfecb7310ade68457392f0e7d4c4ec22d0a401 ("pidfs: keep pidfs dentry stashed once created") https://git.kernel.org/cgit/linux/kernel/git/vfs/vfs.git work.pidfs.xattr in testcase: boot config: x86_64-randconfig-078-20250618 compiler: gcc-12 test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G (please refer to attached dmesg/kmsg for entire log/backtrace) +---------------------------------------------------------+-----------+------------+ | | v6.16-rc1 | e3bfecb731 | +---------------------------------------------------------+-----------+------------+ | WARNING:possible_irq_lock_inversion_dependency_detected | 0 | 12 | +---------------------------------------------------------+-----------+------------+ If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <oliver.sang@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-lkp/202506191555.448b188b-lkp@xxxxxxxxx [ 48.631814][ C0] WARNING: possible irq lock inversion dependency detected [ 48.632323][ C0] 6.16.0-rc1-00001-ge3bfecb7310a #1 Tainted: G T [ 48.632866][ C0] -------------------------------------------------------- [ 48.633351][ C0] sed/223 just changed the state of lock: [ 48.633739][ C0] ffff8881123ae5d8 (&sighand->siglock){-...}-{3:3}, at: __lock_task_sighand (kernel/signal.c:1380) [ 48.634422][ C0] but this lock took another, HARDIRQ-unsafe lock in the past: [ 48.634933][ C0] (&lockref->lock){+.+.}-{3:3} [ 48.634939][ C0] [ 48.634939][ C0] and interrupts could create inverse lock ordering between them. [ 48.634939][ C0] [ 48.636229][ C0] [ 48.636229][ C0] other info that might help us debug this: [ 48.636782][ C0] Chain exists of: [ 48.636782][ C0] &sighand->siglock --> &(&sig->stats_lock)->lock --> &lockref->lock [ 48.636782][ C0] [ 48.637722][ C0] Possible interrupt unsafe locking scenario: [ 48.637722][ C0] [ 48.638283][ C0] CPU0 CPU1 [ 48.638649][ C0] ---- ---- [ 48.639015][ C0] lock(&lockref->lock); [ 48.639315][ C0] local_irq_disable(); [ 48.639774][ C0] lock(&sighand->siglock); [ 48.640257][ C0] lock(&(&sig->stats_lock)->lock); [ 48.640796][ C0] <Interrupt> [ 48.641036][ C0] lock(&sighand->siglock); [ 48.641365][ C0] [ 48.641365][ C0] *** DEADLOCK *** [ 48.641365][ C0] [ 48.641932][ C0] 2 locks held by sed/223: [ 48.642237][ C0] #0: ffffffff87307760 (rcu_read_lock){....}-{1:3}, at: kill_pid_info_type (kernel/signal.c:1451) [ 48.642895][ C0] #1: ffffffff87307760 (rcu_read_lock){....}-{1:3}, at: __lock_task_sighand (include/linux/rcupdate.h:331 include/linux/rcupdate.h:841 kernel/signal.c:1363) [ 48.643557][ C0] [ 48.643557][ C0] the shortest dependencies between 2nd lock and 1st lock: [ 48.644192][ C0] -> (&lockref->lock){+.+.}-{3:3} { [ 48.644575][ C0] HARDIRQ-ON-W at: [ 48.644885][ C0] __lock_acquire (kernel/locking/lockdep.c:5194) [ 48.645364][ C0] lock_acquire (kernel/locking/lockdep.c:473 kernel/locking/lockdep.c:5873 kernel/locking/lockdep.c:5828) [ 48.645824][ C0] _raw_spin_lock (include/linux/spinlock_api_smp.h:134 kernel/locking/spinlock.c:154) [ 48.646290][ C0] __d_instantiate (fs/dcache.c:1915 (discriminator 3)) [ 48.646767][ C0] d_instantiate (include/linux/spinlock.h:391 fs/dcache.c:1948) [ 48.647225][ C0] d_make_root (fs/dcache.c:1992) [ 48.647672][ C0] shmem_fill_super (mm/shmem.c:5106) [ 48.648170][ C0] get_tree_nodev (fs/super.c:1324 fs/super.c:1342) [ 48.648648][ C0] vfs_get_tree (fs/super.c:1803) [ 48.649107][ C0] vfs_kern_mount (fs/namespace.c:6278) [ 48.649620][ C0] kern_mount (fs/namespace.c:6273) [ 48.650062][ C0] shmem_init (mm/shmem.c:5413) [ 48.650512][ C0] mnt_init (fs/namespace.c:6257) [ 48.650954][ C0] vfs_caches_init (fs/dcache.c:3243) [ 48.651430][ C0] start_kernel (init/main.c:1084) [ 48.651894][ C0] x86_64_start_reservations (arch/x86/kernel/head64.c:295) [ 48.652443][ C0] x86_64_start_kernel (arch/x86/kernel/head64.c:231 (discriminator 17)) [ 48.652952][ C0] common_startup_64 (arch/x86/kernel/head_64.S:419) [ 48.653433][ C0] SOFTIRQ-ON-W at: [ 48.653737][ C0] __lock_acquire (kernel/locking/lockdep.c:5194) [ 48.654213][ C0] lock_acquire (kernel/locking/lockdep.c:473 kernel/locking/lockdep.c:5873 kernel/locking/lockdep.c:5828) [ 48.654670][ C0] _raw_spin_lock (include/linux/spinlock_api_smp.h:134 kernel/locking/spinlock.c:154) [ 48.655132][ C0] __d_instantiate (fs/dcache.c:1915 (discriminator 3)) [ 48.655605][ C0] d_instantiate (include/linux/spinlock.h:391 fs/dcache.c:1948) [ 48.656062][ C0] d_make_root (fs/dcache.c:1992) [ 48.656507][ C0] shmem_fill_super (mm/shmem.c:5106) [ 48.657010][ C0] get_tree_nodev (fs/super.c:1324 fs/super.c:1342) [ 48.657480][ C0] vfs_get_tree (fs/super.c:1803) [ 48.657939][ C0] vfs_kern_mount (fs/namespace.c:6278) [ 48.658452][ C0] kern_mount (fs/namespace.c:6273) [ 48.658896][ C0] shmem_init (mm/shmem.c:5413) [ 48.659345][ C0] mnt_init (fs/namespace.c:6257) [ 48.659788][ C0] vfs_caches_init (fs/dcache.c:3243) [ 48.660264][ C0] start_kernel (init/main.c:1084) [ 48.660738][ C0] x86_64_start_reservations (arch/x86/kernel/head64.c:295) [ 48.661266][ C0] x86_64_start_kernel (arch/x86/kernel/head64.c:231 (discriminator 17)) [ 48.661766][ C0] common_startup_64 (arch/x86/kernel/head_64.S:419) [ 48.662264][ C0] INITIAL USE at: [ 48.662555][ C0] __lock_acquire (kernel/locking/lockdep.c:5194) [ 48.663026][ C0] lock_acquire (kernel/locking/lockdep.c:473 kernel/locking/lockdep.c:5873 kernel/locking/lockdep.c:5828) [ 48.663479][ C0] _raw_spin_lock (include/linux/spinlock_api_smp.h:134 kernel/locking/spinlock.c:154) [ 48.663937][ C0] __d_instantiate (fs/dcache.c:1915 (discriminator 3)) [ 48.664406][ C0] d_instantiate (include/linux/spinlock.h:391 fs/dcache.c:1948) [ 48.664866][ C0] d_make_root (fs/dcache.c:1992) [ 48.665307][ C0] shmem_fill_super (mm/shmem.c:5106) [ 48.665796][ C0] get_tree_nodev (fs/super.c:1324 fs/super.c:1342) [ 48.666259][ C0] vfs_get_tree (fs/super.c:1803) [ 48.666711][ C0] vfs_kern_mount (fs/namespace.c:6278) [ 48.667216][ C0] kern_mount (fs/namespace.c:6273) [ 48.667651][ C0] shmem_init (mm/shmem.c:5413) [ 48.668092][ C0] mnt_init (fs/namespace.c:6257) [ 48.668527][ C0] vfs_caches_init (fs/dcache.c:3243) [ 48.669004][ C0] start_kernel (init/main.c:1084) [ 48.669461][ C0] x86_64_start_reservations (arch/x86/kernel/head64.c:295) [ 48.669982][ C0] x86_64_start_kernel (arch/x86/kernel/head64.c:231 (discriminator 17)) [ 48.670476][ C0] common_startup_64 (arch/x86/kernel/head_64.S:419) [ 48.670950][ C0] } [ 48.671147][ C0] ... key at: __key.4+0x0/0x40 [ 48.671654][ C0] ... acquired at: [ 48.671958][ C0] __lock_acquire (kernel/locking/lockdep.c:5240) [ 48.672295][ C0] lock_acquire (kernel/locking/lockdep.c:473 kernel/locking/lockdep.c:5873 kernel/locking/lockdep.c:5828) [ 48.672616][ C0] _raw_spin_lock (include/linux/spinlock_api_smp.h:134 kernel/locking/spinlock.c:154) [ 48.672945][ C0] lockref_get (lib/lockref.c:51) [ 48.673244][ C0] pidfs_stash_dentry (fs/pidfs.c:973) [ 48.673603][ C0] path_from_stashed (fs/libfs.c:2243) [ 48.673956][ C0] pidfs_register_pid (fs/pidfs.c:1067) [ 48.674308][ C0] unix_socketpair (net/unix/af_unix.c:754 net/unix/af_unix.c:1782) [ 48.674650][ C0] __sys_socketpair (net/socket.c:1764) [ 48.674998][ C0] __do_compat_sys_socketcall (net/compat.c:470) [ 48.675405][ C0] __do_fast_syscall_32 (arch/x86/entry/syscall_32.c:83 arch/x86/entry/syscall_32.c:306) [ 48.675769][ C0] do_fast_syscall_32 (arch/x86/entry/syscall_32.c:331) [ 48.676116][ C0] entry_SYSENTER_compat_after_hwframe (arch/x86/entry/entry_64_compat.S:127) [ 48.676561][ C0] [ 48.676737][ C0] -> (&pid->wait_pidfd){....}-{3:3} { [ 48.677128][ C0] INITIAL USE at: [ 48.677415][ C0] __lock_acquire (kernel/locking/lockdep.c:5194) [ 48.677877][ C0] lock_acquire (kernel/locking/lockdep.c:473 kernel/locking/lockdep.c:5873 kernel/locking/lockdep.c:5828) [ 48.678321][ C0] _raw_spin_lock_irqsave (include/linux/spinlock_api_smp.h:111 kernel/locking/spinlock.c:162) [ 48.678820][ C0] __wake_up (kernel/sched/wait.c:106 kernel/sched/wait.c:127) [ 48.679243][ C0] do_notify_parent (kernel/signal.c:2187 (discriminator 11)) [ 48.679715][ C0] exit_notify (kernel/exit.c:762) [ 48.680160][ C0] do_exit (kernel/exit.c:979) [ 48.680582][ C0] kthread_exit (kernel/kthread.c:326) [ 48.681042][ C0] kthread (arch/x86/include/asm/current.h:25 include/linux/cgroup.h:649 kernel/kthread.c:462) [ 48.681464][ C0] ret_from_fork (arch/x86/kernel/process.c:154) [ 48.681920][ C0] ret_from_fork_asm (arch/x86/entry/entry_64.S:255) [ 48.682410][ C0] } [ 48.682603][ C0] ... key at: __key.4+0x0/0x40 [ 48.683107][ C0] ... acquired at: [ 48.683386][ C0] __lock_acquire (kernel/locking/lockdep.c:5240) [ 48.683720][ C0] lock_acquire (kernel/locking/lockdep.c:473 kernel/locking/lockdep.c:5873 kernel/locking/lockdep.c:5828) [ 48.684037][ C0] _raw_spin_lock_irqsave (include/linux/spinlock_api_smp.h:111 kernel/locking/spinlock.c:162) [ 48.684404][ C0] __wake_up (kernel/sched/wait.c:106 kernel/sched/wait.c:127) [ 48.684704][ C0] __exit_signal (kernel/exit.c:143 kernel/exit.c:211) [ 48.685144][ C0] release_task (kernel/exit.c:274 (discriminator 11)) [ 48.685647][ C0] exit_notify (kernel/exit.c:780) [ 48.686160][ C0] do_exit (kernel/exit.c:979) [ 48.686618][ C0] kthread_exit (kernel/kthread.c:326) [ 48.687126][ C0] kthread (arch/x86/include/asm/current.h:25 include/linux/cgroup.h:649 kernel/kthread.c:462) [ 48.687588][ C0] ret_from_fork (arch/x86/kernel/process.c:154) [ 48.688085][ C0] ret_from_fork_asm (arch/x86/entry/entry_64.S:255) [ 48.688603][ C0] [ 48.688848][ C0] -> (&____s->seqcount#4){....}-{0:0} { [ 48.689419][ C0] INITIAL USE at: [ 48.689832][ C0] __lock_acquire (kernel/locking/lockdep.c:5194) [ 48.690480][ C0] lock_acquire (kernel/locking/lockdep.c:473 kernel/locking/lockdep.c:5873 kernel/locking/lockdep.c:5828) [ 48.691106][ C0] __exit_signal (include/linux/seqlock.h:431 include/linux/seqlock.h:478 include/linux/seqlock.h:503 include/linux/seqlock.h:877 kernel/exit.c:198) [ 48.691740][ C0] release_task (kernel/exit.c:274 (discriminator 11)) [ 48.692403][ C0] exit_notify (kernel/exit.c:780) [ 48.693050][ C0] do_exit (kernel/exit.c:979) [ 48.693684][ C0] kthread_exit (kernel/kthread.c:326) [ 48.694360][ C0] kthread (arch/x86/include/asm/current.h:25 include/linux/cgroup.h:649 kernel/kthread.c:462) [ 48.694973][ C0] ret_from_fork (arch/x86/kernel/process.c:154) [ 48.695646][ C0] ret_from_fork_asm (arch/x86/entry/entry_64.S:255) [ 48.696356][ C0] INITIAL READ USE at: [ 48.696860][ C0] __lock_acquire (kernel/locking/lockdep.c:5194) The kernel config and materials to reproduce are available at: https://download.01.org/0day-ci/archive/20250619/202506191555.448b188b-lkp@xxxxxxxxx -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki