Extracting prog: 2m31.680869193s Minimizing prog: 4m14.74587976s Simplifying prog options: 0s Extracting C: 30.052939154s Simplifying C: 6m13.931051256s extracting reproducer from 1 programs testing a last program of every proc single: executing 1 programs separately with timeout 30s testing program (duration=30s, {Threaded:true Repeat:true RepeatTimes:0 Procs:5 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): socket$inet6_tcp-setsockopt$IP6T_SO_SET_REPLACE detailed listing: executing program 0: r0 = socket$inet6_tcp(0xa, 0x1, 0x0) setsockopt$IP6T_SO_SET_REPLACE(r0, 0x29, 0x40, &(0x7f0000000440)=@raw={'raw\x00', 0x3c1, 0x3, 0x1350, 0x1120, 0xc8, 0xb8, 0x12, 0x2804, 0x1280, 0x2e8, 0x2e8, 0x1280, 0x2e8, 0x3, 0x0, {[{{@uncond, 0x4a00, 0x1100, 0x1120, 0x300, {0x0, 0x2000000000000}, [@common=@unspec=@cgroup1={{0x1030}, {0x60, 0x0, 0x0, 0x0, './cgroup.cpu/syz0\x00'}}, @inet=@rpfilter={{0x28}}]}, @unspec=@NOTRACK={0x20}}, {{@ipv6={@ipv4, @initdev={0xfe, 0x88, '\x00', 0x0, 0x0}, [], [], 'team0\x00', 'pim6reg\x00'}, 0x0, 0xf8, 0x160, 0x0, {}, [@inet=@rpfilter={{0x28}}, @inet=@rpfilter={{0x28}}]}, @unspec=@CT1={0x68, 'CT\x00', 0x1, {0x0, 0x0, 0x0, 0x0, 'netbios-ns\x00', 'syz1\x00'}}}], {{'\x00', 0x0, 0xa8, 0xd0}, {0x28}}}}, 0x13b0) program crashed: BUG: sleeping function called from invalid context in kernfs_walk_and_get_ns program crashed: BUG: sleeping function called from invalid context in kernfs_walk_and_get_ns single: successfully extracted reproducer found reproducer with 2 syscalls minimizing guilty program testing program (duration=45.564076206s, {Threaded:true Repeat:true RepeatTimes:0 Procs:5 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): socket$inet6_tcp detailed listing: executing program 0: socket$inet6_tcp(0xa, 0x1, 0x0) program did not crash testing program (duration=45.564076206s, {Threaded:true Repeat:true RepeatTimes:0 Procs:5 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): setsockopt$IP6T_SO_SET_REPLACE detailed listing: executing program 0: setsockopt$IP6T_SO_SET_REPLACE(0xffffffffffffffff, 0x29, 0x40, &(0x7f0000000440)=@raw={'raw\x00', 0x3c1, 0x3, 0x1350, 0x1120, 0xc8, 0xb8, 0x12, 0x2804, 0x1280, 0x2e8, 0x2e8, 0x1280, 0x2e8, 0x3, 0x0, {[{{@uncond, 0x4a00, 0x1100, 0x1120, 0x300, {0x0, 0x2000000000000}, [@common=@unspec=@cgroup1={{0x1030}, {0x60, 0x0, 0x0, 0x0, './cgroup.cpu/syz0\x00'}}, @inet=@rpfilter={{0x28}}]}, @unspec=@NOTRACK={0x20}}, {{@ipv6={@ipv4, @initdev={0xfe, 0x88, '\x00', 0x0, 0x0}, [], [], 'team0\x00', 'pim6reg\x00'}, 0x0, 0xf8, 0x160, 0x0, {}, [@inet=@rpfilter={{0x28}}, @inet=@rpfilter={{0x28}}]}, @unspec=@CT1={0x68, 'CT\x00', 0x1, {0x0, 0x0, 0x0, 0x0, 'netbios-ns\x00', 'syz1\x00'}}}], {{'\x00', 0x0, 0xa8, 0xd0}, {0x28}}}}, 0x13b0) program did not crash testing program (duration=45.564076206s, {Threaded:true Repeat:true RepeatTimes:0 Procs:5 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): socket$inet6_tcp-setsockopt$IP6T_SO_SET_REPLACE detailed listing: executing program 0: r0 = socket$inet6_tcp(0xa, 0x1, 0x0) setsockopt$IP6T_SO_SET_REPLACE(r0, 0x29, 0x40, 0x0, 0x0) program did not crash extracting C reproducer testing compiled C program (duration=45.564076206s, {Threaded:true Repeat:true RepeatTimes:0 Procs:5 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): socket$inet6_tcp-setsockopt$IP6T_SO_SET_REPLACE program crashed: BUG: sleeping function called from invalid context in kernfs_walk_and_get_ns simplifying C reproducer testing compiled C program (duration=45.564076206s, {Threaded:false Repeat:true RepeatTimes:0 Procs:5 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:true Cgroups:true BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): socket$inet6_tcp-setsockopt$IP6T_SO_SET_REPLACE program crashed: BUG: sleeping function called from invalid context in kernfs_walk_and_get_ns testing compiled C program (duration=45.564076206s, {Threaded:false Repeat:false RepeatTimes:0 Procs:1 Slowdown:1 Sandbox:none SandboxArg:0 Leak:false NetInjection:true NetDevices:true NetReset:false Cgroups:false BinfmtMisc:true CloseFDs:true KCSAN:false DevlinkPCI:false NicVF:false USB:true VhciInjection:true Wifi:true IEEE802154:true Sysctl:true Swap:true UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): socket$inet6_tcp-setsockopt$IP6T_SO_SET_REPLACE program crashed: BUG: sleeping function called from invalid context in kernfs_walk_and_get_ns testing compiled C program (duration=45.564076206s, {Threaded:false Repeat:false RepeatTimes:0 Procs:1 Slowdown:1 Sandbox: SandboxArg:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false NicVF:false USB:false VhciInjection:false Wifi:false IEEE802154:true Sysctl:true Swap:false UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): socket$inet6_tcp-setsockopt$IP6T_SO_SET_REPLACE program crashed: BUG: sleeping function called from invalid context in kernfs_walk_and_get_ns testing compiled C program (duration=45.564076206s, {Threaded:false Repeat:false RepeatTimes:0 Procs:1 Slowdown:1 Sandbox: SandboxArg:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false NicVF:false USB:false VhciInjection:false Wifi:false IEEE802154:false Sysctl:true Swap:false UseTmpDir:true HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): socket$inet6_tcp-setsockopt$IP6T_SO_SET_REPLACE program crashed: BUG: sleeping function called from invalid context in kernfs_walk_and_get_ns testing compiled C program (duration=45.564076206s, {Threaded:false Repeat:false RepeatTimes:0 Procs:1 Slowdown:1 Sandbox: SandboxArg:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false NicVF:false USB:false VhciInjection:false Wifi:false IEEE802154:false Sysctl:true Swap:false UseTmpDir:false HandleSegv:true Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): socket$inet6_tcp-setsockopt$IP6T_SO_SET_REPLACE program crashed: BUG: sleeping function called from invalid context in kernfs_walk_and_get_ns testing compiled C program (duration=45.564076206s, {Threaded:false Repeat:false RepeatTimes:0 Procs:1 Slowdown:1 Sandbox: SandboxArg:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false NicVF:false USB:false VhciInjection:false Wifi:false IEEE802154:false Sysctl:true Swap:false UseTmpDir:false HandleSegv:false Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): socket$inet6_tcp-setsockopt$IP6T_SO_SET_REPLACE program crashed: BUG: sleeping function called from invalid context in kernfs_walk_and_get_ns testing compiled C program (duration=45.564076206s, {Threaded:false Repeat:false RepeatTimes:0 Procs:1 Slowdown:1 Sandbox: SandboxArg:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false NicVF:false USB:false VhciInjection:false Wifi:false IEEE802154:false Sysctl:false Swap:false UseTmpDir:false HandleSegv:false Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): socket$inet6_tcp-setsockopt$IP6T_SO_SET_REPLACE program crashed: BUG: sleeping function called from invalid context in kernfs_walk_and_get_ns testing program (duration=45.564076206s, {Threaded:false Repeat:false RepeatTimes:0 Procs:1 Slowdown:1 Sandbox: SandboxArg:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false NicVF:false USB:false VhciInjection:false Wifi:false IEEE802154:false Sysctl:false Swap:false UseTmpDir:false HandleSegv:false Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): socket$inet6_tcp-setsockopt$IP6T_SO_SET_REPLACE detailed listing: executing program 0: r0 = socket$inet6_tcp(0xa, 0x1, 0x0) setsockopt$IP6T_SO_SET_REPLACE(r0, 0x29, 0x40, &(0x7f0000000440)=@raw={'raw\x00', 0x3c1, 0x3, 0x1350, 0x1120, 0xc8, 0xb8, 0x12, 0x2804, 0x1280, 0x2e8, 0x2e8, 0x1280, 0x2e8, 0x3, 0x0, {[{{@uncond, 0x4a00, 0x1100, 0x1120, 0x300, {0x0, 0x2000000000000}, [@common=@unspec=@cgroup1={{0x1030}, {0x60, 0x0, 0x0, 0x0, './cgroup.cpu/syz0\x00'}}, @inet=@rpfilter={{0x28}}]}, @unspec=@NOTRACK={0x20}}, {{@ipv6={@ipv4, @initdev={0xfe, 0x88, '\x00', 0x0, 0x0}, [], [], 'team0\x00', 'pim6reg\x00'}, 0x0, 0xf8, 0x160, 0x0, {}, [@inet=@rpfilter={{0x28}}, @inet=@rpfilter={{0x28}}]}, @unspec=@CT1={0x68, 'CT\x00', 0x1, {0x0, 0x0, 0x0, 0x0, 'netbios-ns\x00', 'syz1\x00'}}}], {{'\x00', 0x0, 0xa8, 0xd0}, {0x28}}}}, 0x13b0) program crashed: BUG: sleeping function called from invalid context in kernfs_walk_and_get_ns validation run: crashed=true testing program (duration=45.564076206s, {Threaded:false Repeat:false RepeatTimes:0 Procs:1 Slowdown:1 Sandbox: SandboxArg:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false NicVF:false USB:false VhciInjection:false Wifi:false IEEE802154:false Sysctl:false Swap:false UseTmpDir:false HandleSegv:false Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): socket$inet6_tcp-setsockopt$IP6T_SO_SET_REPLACE detailed listing: executing program 0: r0 = socket$inet6_tcp(0xa, 0x1, 0x0) setsockopt$IP6T_SO_SET_REPLACE(r0, 0x29, 0x40, &(0x7f0000000440)=@raw={'raw\x00', 0x3c1, 0x3, 0x1350, 0x1120, 0xc8, 0xb8, 0x12, 0x2804, 0x1280, 0x2e8, 0x2e8, 0x1280, 0x2e8, 0x3, 0x0, {[{{@uncond, 0x4a00, 0x1100, 0x1120, 0x300, {0x0, 0x2000000000000}, [@common=@unspec=@cgroup1={{0x1030}, {0x60, 0x0, 0x0, 0x0, './cgroup.cpu/syz0\x00'}}, @inet=@rpfilter={{0x28}}]}, @unspec=@NOTRACK={0x20}}, {{@ipv6={@ipv4, @initdev={0xfe, 0x88, '\x00', 0x0, 0x0}, [], [], 'team0\x00', 'pim6reg\x00'}, 0x0, 0xf8, 0x160, 0x0, {}, [@inet=@rpfilter={{0x28}}, @inet=@rpfilter={{0x28}}]}, @unspec=@CT1={0x68, 'CT\x00', 0x1, {0x0, 0x0, 0x0, 0x0, 'netbios-ns\x00', 'syz1\x00'}}}], {{'\x00', 0x0, 0xa8, 0xd0}, {0x28}}}}, 0x13b0) program crashed: BUG: sleeping function called from invalid context in kernfs_walk_and_get_ns validation run: crashed=true testing program (duration=45.564076206s, {Threaded:false Repeat:false RepeatTimes:0 Procs:1 Slowdown:1 Sandbox: SandboxArg:0 Leak:false NetInjection:false NetDevices:false NetReset:false Cgroups:false BinfmtMisc:false CloseFDs:false KCSAN:false DevlinkPCI:false NicVF:false USB:false VhciInjection:false Wifi:false IEEE802154:false Sysctl:false Swap:false UseTmpDir:false HandleSegv:false Trace:false CallComments:true LegacyOptions:{Collide:false Fault:false FaultCall:0 FaultNth:0}}): socket$inet6_tcp-setsockopt$IP6T_SO_SET_REPLACE detailed listing: executing program 0: r0 = socket$inet6_tcp(0xa, 0x1, 0x0) setsockopt$IP6T_SO_SET_REPLACE(r0, 0x29, 0x40, &(0x7f0000000440)=@raw={'raw\x00', 0x3c1, 0x3, 0x1350, 0x1120, 0xc8, 0xb8, 0x12, 0x2804, 0x1280, 0x2e8, 0x2e8, 0x1280, 0x2e8, 0x3, 0x0, {[{{@uncond, 0x4a00, 0x1100, 0x1120, 0x300, {0x0, 0x2000000000000}, [@common=@unspec=@cgroup1={{0x1030}, {0x60, 0x0, 0x0, 0x0, './cgroup.cpu/syz0\x00'}}, @inet=@rpfilter={{0x28}}]}, @unspec=@NOTRACK={0x20}}, {{@ipv6={@ipv4, @initdev={0xfe, 0x88, '\x00', 0x0, 0x0}, [], [], 'team0\x00', 'pim6reg\x00'}, 0x0, 0xf8, 0x160, 0x0, {}, [@inet=@rpfilter={{0x28}}, @inet=@rpfilter={{0x28}}]}, @unspec=@CT1={0x68, 'CT\x00', 0x1, {0x0, 0x0, 0x0, 0x0, 'netbios-ns\x00', 'syz1\x00'}}}], {{'\x00', 0x0, 0xa8, 0xd0}, {0x28}}}}, 0x13b0) program crashed: BUG: sleeping function called from invalid context in kernfs_walk_and_get_ns validation run: crashed=true reproducing took 16m18.967813004s repro crashed as (corrupted=false): BUG: sleeping function called from invalid context at kernel/locking/rwsem.c:1497 in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 4484, name: syz.0.17 1 lock held by syz.0.17/4484: #0: ffffffff8c142078 (css_set_lock){..-.}-{2:2}, at: spin_lock_irq include/linux/spinlock.h:389 [inline] #0: ffffffff8c142078 (css_set_lock){..-.}-{2:2}, at: cgroup_get_from_path+0x26/0x2f0 kernel/cgroup/cgroup.c:6656 irq event stamp: 1860 hardirqs last enabled at (1859): [] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:160 [inline] hardirqs last enabled at (1859): [] _raw_spin_unlock_irqrestore+0x82/0x100 kernel/locking/spinlock.c:194 hardirqs last disabled at (1860): [] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:126 [inline] hardirqs last disabled at (1860): [] _raw_spin_lock_irq+0x7a/0xe0 kernel/locking/spinlock.c:170 softirqs last enabled at (1826): [] do_ipv6_setsockopt net/ipv6/ipv6_sockglue.c:985 [inline] softirqs last enabled at (1826): [] ipv6_setsockopt+0x1c38/0x3890 net/ipv6/ipv6_sockglue.c:1009 softirqs last disabled at (1824): [] spin_lock_bh include/linux/spinlock.h:369 [inline] softirqs last disabled at (1824): [] release_sock+0x2b/0x1b0 net/core/sock.c:3269 Preemption disabled at: [<0000000000000000>] 0x0 CPU: 1 PID: 4484 Comm: syz.0.17 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025 Call Trace: dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106 ___might_sleep+0x47c/0x600 kernel/sched/core.c:9658 down_read+0x20/0x2e0 kernel/locking/rwsem.c:1497 kernfs_walk_and_get_ns+0x81/0x2b0 fs/kernfs/dir.c:908 kernfs_walk_and_get include/linux/kernfs.h:559 [inline] cgroup_get_from_path+0x5f/0x2f0 kernel/cgroup/cgroup.c:6658 cgroup_mt_check_v1+0x1ae/0x2c0 net/netfilter/xt_cgroup.c:56 xt_check_match+0x3c6/0xaa0 net/netfilter/x_tables.c:523 check_match net/ipv6/netfilter/ip6_tables.c:490 [inline] find_check_match net/ipv6/netfilter/ip6_tables.c:507 [inline] find_check_entry net/ipv6/netfilter/ip6_tables.c:558 [inline] translate_table+0x153d/0x2020 net/ipv6/netfilter/ip6_tables.c:735 do_replace net/ipv6/netfilter/ip6_tables.c:1156 [inline] do_ip6t_set_ctl+0x975/0xd00 net/ipv6/netfilter/ip6_tables.c:1646 nf_setsockopt+0x25f/0x280 net/netfilter/nf_sockopt.c:101 ipv6_setsockopt+0x1cb8/0x3890 net/ipv6/ipv6_sockglue.c:1014 tcp_setsockopt+0x21a/0x1d70 net/ipv4/tcp.c:3719 __sys_setsockopt+0x2bf/0x3d0 net/socket.c:2213 __do_sys_setsockopt net/socket.c:2224 [inline] __se_sys_setsockopt net/socket.c:2221 [inline] __x64_sys_setsockopt+0xb1/0xc0 net/socket.c:2221 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f9c27622fc9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fff74506f88 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 00007f9c27879fa0 RCX: 00007f9c27622fc9 RDX: 0000000000000040 RSI: 0000000000000029 RDI: 0000000000000003 RBP: 00007f9c276a5f91 R08: 00000000000013b0 R09: 0000000000000000 R10: 0000200000000440 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f9c27879fa0 R14: 00007f9c27879fa0 R15: 0000000000000005 ============================= [ BUG: Invalid wait context ] syzkaller #0 Tainted: G W ----------------------------- syz.0.17/4484 is trying to lock: ffffffff8c24d5b0 (kernfs_rwsem){++++}-{3:3}, at: kernfs_walk_and_get_ns+0x81/0x2b0 fs/kernfs/dir.c:908 other info that might help us debug this: context-{4:4} 1 lock held by syz.0.17/4484: #0: ffffffff8c142078 (css_set_lock){..-.}-{2:2}, at: spin_lock_irq include/linux/spinlock.h:389 [inline] #0: ffffffff8c142078 (css_set_lock){..-.}-{2:2}, at: cgroup_get_from_path+0x26/0x2f0 kernel/cgroup/cgroup.c:6656 stack backtrace: CPU: 1 PID: 4484 Comm: syz.0.17 Tainted: G W syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025 Call Trace: dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106 print_lock_invalid_wait_context kernel/locking/lockdep.c:4664 [inline] check_wait_context kernel/locking/lockdep.c:4725 [inline] __lock_acquire+0x1be9/0x7c60 kernel/locking/lockdep.c:4962 lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623 down_read+0x44/0x2e0 kernel/locking/rwsem.c:1498 kernfs_walk_and_get_ns+0x81/0x2b0 fs/kernfs/dir.c:908 kernfs_walk_and_get include/linux/kernfs.h:559 [inline] cgroup_get_from_path+0x5f/0x2f0 kernel/cgroup/cgroup.c:6658 cgroup_mt_check_v1+0x1ae/0x2c0 net/netfilter/xt_cgroup.c:56 xt_check_match+0x3c6/0xaa0 net/netfilter/x_tables.c:523 check_match net/ipv6/netfilter/ip6_tables.c:490 [inline] find_check_match net/ipv6/netfilter/ip6_tables.c:507 [inline] find_check_entry net/ipv6/netfilter/ip6_tables.c:558 [inline] translate_table+0x153d/0x2020 net/ipv6/netfilter/ip6_tables.c:735 do_replace net/ipv6/netfilter/ip6_tables.c:1156 [inline] do_ip6t_set_ctl+0x975/0xd00 net/ipv6/netfilter/ip6_tables.c:1646 nf_setsockopt+0x25f/0x280 net/netfilter/nf_sockopt.c:101 ipv6_setsockopt+0x1cb8/0x3890 net/ipv6/ipv6_sockglue.c:1014 tcp_setsockopt+0x21a/0x1d70 net/ipv4/tcp.c:3719 __sys_setsockopt+0x2bf/0x3d0 net/socket.c:2213 __do_sys_setsockopt net/socket.c:2224 [inline] __se_sys_setsockopt net/socket.c:2221 [inline] __x64_sys_setsockopt+0xb1/0xc0 net/socket.c:2221 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f9c27622fc9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fff74506f88 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 00007f9c27879fa0 RCX: 00007f9c27622fc9 RDX: 0000000000000040 RSI: 0000000000000029 RDI: 0000000000000003 RBP: 00007f9c276a5f91 R08: 00000000000013b0 R09: 0000000000000000 R10: 0000200000000440 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f9c27879fa0 R14: 00007f9c27879fa0 R15: 0000000000000005 xt_cgroup: invalid path, errno=-2 final repro crashed as (corrupted=false): BUG: sleeping function called from invalid context at kernel/locking/rwsem.c:1497 in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 4484, name: syz.0.17 1 lock held by syz.0.17/4484: #0: ffffffff8c142078 (css_set_lock){..-.}-{2:2}, at: spin_lock_irq include/linux/spinlock.h:389 [inline] #0: ffffffff8c142078 (css_set_lock){..-.}-{2:2}, at: cgroup_get_from_path+0x26/0x2f0 kernel/cgroup/cgroup.c:6656 irq event stamp: 1860 hardirqs last enabled at (1859): [] __raw_spin_unlock_irqrestore include/linux/spinlock_api_smp.h:160 [inline] hardirqs last enabled at (1859): [] _raw_spin_unlock_irqrestore+0x82/0x100 kernel/locking/spinlock.c:194 hardirqs last disabled at (1860): [] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:126 [inline] hardirqs last disabled at (1860): [] _raw_spin_lock_irq+0x7a/0xe0 kernel/locking/spinlock.c:170 softirqs last enabled at (1826): [] do_ipv6_setsockopt net/ipv6/ipv6_sockglue.c:985 [inline] softirqs last enabled at (1826): [] ipv6_setsockopt+0x1c38/0x3890 net/ipv6/ipv6_sockglue.c:1009 softirqs last disabled at (1824): [] spin_lock_bh include/linux/spinlock.h:369 [inline] softirqs last disabled at (1824): [] release_sock+0x2b/0x1b0 net/core/sock.c:3269 Preemption disabled at: [<0000000000000000>] 0x0 CPU: 1 PID: 4484 Comm: syz.0.17 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025 Call Trace: dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106 ___might_sleep+0x47c/0x600 kernel/sched/core.c:9658 down_read+0x20/0x2e0 kernel/locking/rwsem.c:1497 kernfs_walk_and_get_ns+0x81/0x2b0 fs/kernfs/dir.c:908 kernfs_walk_and_get include/linux/kernfs.h:559 [inline] cgroup_get_from_path+0x5f/0x2f0 kernel/cgroup/cgroup.c:6658 cgroup_mt_check_v1+0x1ae/0x2c0 net/netfilter/xt_cgroup.c:56 xt_check_match+0x3c6/0xaa0 net/netfilter/x_tables.c:523 check_match net/ipv6/netfilter/ip6_tables.c:490 [inline] find_check_match net/ipv6/netfilter/ip6_tables.c:507 [inline] find_check_entry net/ipv6/netfilter/ip6_tables.c:558 [inline] translate_table+0x153d/0x2020 net/ipv6/netfilter/ip6_tables.c:735 do_replace net/ipv6/netfilter/ip6_tables.c:1156 [inline] do_ip6t_set_ctl+0x975/0xd00 net/ipv6/netfilter/ip6_tables.c:1646 nf_setsockopt+0x25f/0x280 net/netfilter/nf_sockopt.c:101 ipv6_setsockopt+0x1cb8/0x3890 net/ipv6/ipv6_sockglue.c:1014 tcp_setsockopt+0x21a/0x1d70 net/ipv4/tcp.c:3719 __sys_setsockopt+0x2bf/0x3d0 net/socket.c:2213 __do_sys_setsockopt net/socket.c:2224 [inline] __se_sys_setsockopt net/socket.c:2221 [inline] __x64_sys_setsockopt+0xb1/0xc0 net/socket.c:2221 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f9c27622fc9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fff74506f88 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 00007f9c27879fa0 RCX: 00007f9c27622fc9 RDX: 0000000000000040 RSI: 0000000000000029 RDI: 0000000000000003 RBP: 00007f9c276a5f91 R08: 00000000000013b0 R09: 0000000000000000 R10: 0000200000000440 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f9c27879fa0 R14: 00007f9c27879fa0 R15: 0000000000000005 ============================= [ BUG: Invalid wait context ] syzkaller #0 Tainted: G W ----------------------------- syz.0.17/4484 is trying to lock: ffffffff8c24d5b0 (kernfs_rwsem){++++}-{3:3}, at: kernfs_walk_and_get_ns+0x81/0x2b0 fs/kernfs/dir.c:908 other info that might help us debug this: context-{4:4} 1 lock held by syz.0.17/4484: #0: ffffffff8c142078 (css_set_lock){..-.}-{2:2}, at: spin_lock_irq include/linux/spinlock.h:389 [inline] #0: ffffffff8c142078 (css_set_lock){..-.}-{2:2}, at: cgroup_get_from_path+0x26/0x2f0 kernel/cgroup/cgroup.c:6656 stack backtrace: CPU: 1 PID: 4484 Comm: syz.0.17 Tainted: G W syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/02/2025 Call Trace: dump_stack_lvl+0x168/0x230 lib/dump_stack.c:106 print_lock_invalid_wait_context kernel/locking/lockdep.c:4664 [inline] check_wait_context kernel/locking/lockdep.c:4725 [inline] __lock_acquire+0x1be9/0x7c60 kernel/locking/lockdep.c:4962 lock_acquire+0x197/0x3f0 kernel/locking/lockdep.c:5623 down_read+0x44/0x2e0 kernel/locking/rwsem.c:1498 kernfs_walk_and_get_ns+0x81/0x2b0 fs/kernfs/dir.c:908 kernfs_walk_and_get include/linux/kernfs.h:559 [inline] cgroup_get_from_path+0x5f/0x2f0 kernel/cgroup/cgroup.c:6658 cgroup_mt_check_v1+0x1ae/0x2c0 net/netfilter/xt_cgroup.c:56 xt_check_match+0x3c6/0xaa0 net/netfilter/x_tables.c:523 check_match net/ipv6/netfilter/ip6_tables.c:490 [inline] find_check_match net/ipv6/netfilter/ip6_tables.c:507 [inline] find_check_entry net/ipv6/netfilter/ip6_tables.c:558 [inline] translate_table+0x153d/0x2020 net/ipv6/netfilter/ip6_tables.c:735 do_replace net/ipv6/netfilter/ip6_tables.c:1156 [inline] do_ip6t_set_ctl+0x975/0xd00 net/ipv6/netfilter/ip6_tables.c:1646 nf_setsockopt+0x25f/0x280 net/netfilter/nf_sockopt.c:101 ipv6_setsockopt+0x1cb8/0x3890 net/ipv6/ipv6_sockglue.c:1014 tcp_setsockopt+0x21a/0x1d70 net/ipv4/tcp.c:3719 __sys_setsockopt+0x2bf/0x3d0 net/socket.c:2213 __do_sys_setsockopt net/socket.c:2224 [inline] __se_sys_setsockopt net/socket.c:2221 [inline] __x64_sys_setsockopt+0xb1/0xc0 net/socket.c:2221 do_syscall_x64 arch/x86/entry/common.c:50 [inline] do_syscall_64+0x4c/0xa0 arch/x86/entry/common.c:80 entry_SYSCALL_64_after_hwframe+0x66/0xd0 RIP: 0033:0x7f9c27622fc9 Code: ff ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 a8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fff74506f88 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 00007f9c27879fa0 RCX: 00007f9c27622fc9 RDX: 0000000000000040 RSI: 0000000000000029 RDI: 0000000000000003 RBP: 00007f9c276a5f91 R08: 00000000000013b0 R09: 0000000000000000 R10: 0000200000000440 R11: 0000000000000246 R12: 0000000000000000 R13: 00007f9c27879fa0 R14: 00007f9c27879fa0 R15: 0000000000000005 xt_cgroup: invalid path, errno=-2