BUG: sleeping function called from invalid context at kernel/locking/rwsem.c:1497 in_atomic(): 1, irqs_disabled(): 1, non_block: 0, pid: 5616, name: syz.1.451 1 lock held by syz.1.451/5616: #0: ffffffff8c344878 (css_set_lock){..-.}-{2:2}, at: spin_lock_irq include/linux/spinlock.h:389 [inline] #0: ffffffff8c344878 (css_set_lock){..-.}-{2:2}, at: cgroup_get_from_path+0x26/0x2f0 kernel/cgroup/cgroup.c:6657 irq event stamp: 540 hardirqs last enabled at (539): [] asm_sysvec_reschedule_ipi+0x16/0x20 arch/x86/include/asm/idtentry.h:681 hardirqs last disabled at (540): [] __raw_spin_lock_irq include/linux/spinlock_api_smp.h:126 [inline] hardirqs last disabled at (540): [] _raw_spin_lock_irq+0x86/0xf0 kernel/locking/spinlock.c:170 softirqs last enabled at (444): [] do_ip_setsockopt net/ipv4/ip_sockglue.c:1369 [inline] softirqs last enabled at (444): [] ip_setsockopt+0x58a/0x31e0 net/ipv4/ip_sockglue.c:1430 softirqs last disabled at (442): [] spin_lock_bh include/linux/spinlock.h:369 [inline] softirqs last disabled at (442): [] release_sock+0x2b/0x1b0 net/core/sock.c:3272 Preemption disabled at: [<0000000000000000>] 0x0 CPU: 1 PID: 5616 Comm: syz.1.451 Not tainted syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026 Call Trace: dump_stack_lvl+0x188/0x250 lib/dump_stack.c:106 ___might_sleep+0x493/0x610 kernel/sched/core.c:9658 down_read+0x20/0x2e0 kernel/locking/rwsem.c:1497 kernfs_walk_and_get_ns+0x7e/0x2c0 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:6659 cgroup_mt_check_v1+0x1d2/0x2d0 net/netfilter/xt_cgroup.c:59 xt_check_match+0x499/0xc50 net/netfilter/x_tables.c:534 check_match net/ipv4/netfilter/ip_tables.c:472 [inline] find_check_match net/ipv4/netfilter/ip_tables.c:488 [inline] find_check_entry net/ipv4/netfilter/ip_tables.c:538 [inline] translate_table+0x1481/0x1f60 net/ipv4/netfilter/ip_tables.c:717 do_replace net/ipv4/netfilter/ip_tables.c:1136 [inline] do_ipt_set_ctl+0x963/0xd70 net/ipv4/netfilter/ip_tables.c:1633 nf_setsockopt+0x25f/0x280 net/netfilter/nf_sockopt.c:101 ip_setsockopt+0x29c3/0x31e0 net/ipv4/ip_sockglue.c:1442 tcp_setsockopt+0x229/0x1e60 net/ipv4/tcp.c:3722 __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:0x7ff9096b6e99 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ff90790f028 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 00007ff90993efa0 RCX: 00007ff9096b6e99 RDX: 0000000000000040 RSI: 0004000000000000 RDI: 0000000000000004 RBP: 00007ff90974ceaf R08: 00000000000012c8 R09: 0000000000000000 R10: 00002000000017c0 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ff90993f038 R14: 00007ff90993efa0 R15: 00007ffe447dae78 ============================= [ BUG: Invalid wait context ] syzkaller #0 Tainted: G W ----------------------------- syz.1.451/5616 is trying to lock: ffffffff8c44fd70 (kernfs_rwsem){++++}-{3:3}, at: kernfs_walk_and_get_ns+0x7e/0x2c0 fs/kernfs/dir.c:908 other info that might help us debug this: context-{4:4} 1 lock held by syz.1.451/5616: #0: ffffffff8c344878 (css_set_lock){..-.}-{2:2}, at: spin_lock_irq include/linux/spinlock.h:389 [inline] #0: ffffffff8c344878 (css_set_lock){..-.}-{2:2}, at: cgroup_get_from_path+0x26/0x2f0 kernel/cgroup/cgroup.c:6657 stack backtrace: CPU: 1 PID: 5616 Comm: syz.1.451 Tainted: G W syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/16/2026 Call Trace: dump_stack_lvl+0x188/0x250 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+0x1bb7/0x7b50 kernel/locking/lockdep.c:4962 lock_acquire+0x19e/0x400 kernel/locking/lockdep.c:5623 down_read+0x44/0x2e0 kernel/locking/rwsem.c:1498 kernfs_walk_and_get_ns+0x7e/0x2c0 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:6659 cgroup_mt_check_v1+0x1d2/0x2d0 net/netfilter/xt_cgroup.c:59 xt_check_match+0x499/0xc50 net/netfilter/x_tables.c:534 check_match net/ipv4/netfilter/ip_tables.c:472 [inline] find_check_match net/ipv4/netfilter/ip_tables.c:488 [inline] find_check_entry net/ipv4/netfilter/ip_tables.c:538 [inline] translate_table+0x1481/0x1f60 net/ipv4/netfilter/ip_tables.c:717 do_replace net/ipv4/netfilter/ip_tables.c:1136 [inline] do_ipt_set_ctl+0x963/0xd70 net/ipv4/netfilter/ip_tables.c:1633 nf_setsockopt+0x25f/0x280 net/netfilter/nf_sockopt.c:101 ip_setsockopt+0x29c3/0x31e0 net/ipv4/ip_sockglue.c:1442 tcp_setsockopt+0x229/0x1e60 net/ipv4/tcp.c:3722 __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:0x7ff9096b6e99 Code: ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 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 e8 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007ff90790f028 EFLAGS: 00000246 ORIG_RAX: 0000000000000036 RAX: ffffffffffffffda RBX: 00007ff90993efa0 RCX: 00007ff9096b6e99 RDX: 0000000000000040 RSI: 0004000000000000 RDI: 0000000000000004 RBP: 00007ff90974ceaf R08: 00000000000012c8 R09: 0000000000000000 R10: 00002000000017c0 R11: 0000000000000246 R12: 0000000000000000 R13: 00007ff90993f038 R14: 00007ff90993efa0 R15: 00007ffe447dae78 xt_cgroup: invalid path, errno=-2