audit: type=1804 audit(1648472680.372:3): pid=9805 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.1" name="/root/syzkaller-testdir2506111357/syzkaller.09zNiz/7/bus" dev="sda1" ino=13960 res=1
======================================================
WARNING: possible circular locking dependency detected
4.14.274-syzkaller #0 Not tainted
------------------------------------------------------
kworker/u4:2/34 is trying to acquire lock:
 (sk_lock-AF_INET){+.+.}, at: [<ffffffff8682245e>] do_strp_work net/strparser/strparser.c:415 [inline]
 (sk_lock-AF_INET){+.+.}, at: [<ffffffff8682245e>] strp_work+0x3e/0x100 net/strparser/strparser.c:434

but task is already holding lock:
 ((&strp->work)){+.+.}, at: [<ffffffff81364f16>] process_one_work+0x6e6/0x14a0 kernel/workqueue.c:2092

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #1 ((&strp->work)){+.+.}:
       flush_work+0xad/0x770 kernel/workqueue.c:2890
       __cancel_work_timer+0x321/0x460 kernel/workqueue.c:2965
       strp_done+0x53/0xd0 net/strparser/strparser.c:519
       kcm_attach net/kcm/kcmsock.c:1429 [inline]
       kcm_attach_ioctl net/kcm/kcmsock.c:1490 [inline]
       kcm_ioctl+0x828/0xfb0 net/kcm/kcmsock.c:1701
       sock_do_ioctl net/socket.c:974 [inline]
       sock_ioctl+0x2cc/0x4c0 net/socket.c:1071
       vfs_ioctl fs/ioctl.c:46 [inline]
       file_ioctl fs/ioctl.c:500 [inline]
       do_vfs_ioctl+0x75a/0xff0 fs/ioctl.c:684
       SYSC_ioctl fs/ioctl.c:701 [inline]
       SyS_ioctl+0x7f/0xb0 fs/ioctl.c:692
       do_syscall_64+0x1d5/0x640 arch/x86/entry/common.c:292
       entry_SYSCALL_64_after_hwframe+0x46/0xbb

-> #0 (sk_lock-AF_INET){+.+.}:
       lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998
       lock_sock_nested+0xb7/0x100 net/core/sock.c:2813
       do_strp_work net/strparser/strparser.c:415 [inline]
       strp_work+0x3e/0x100 net/strparser/strparser.c:434
       process_one_work+0x793/0x14a0 kernel/workqueue.c:2117
       worker_thread+0x5cc/0xff0 kernel/workqueue.c:2251
       kthread+0x30d/0x420 kernel/kthread.c:232
       ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404

other info that might help us debug this:

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock((&strp->work));
                               lock(sk_lock-AF_INET);
                               lock((&strp->work));
  lock(sk_lock-AF_INET);

 *** DEADLOCK ***

2 locks held by kworker/u4:2/34:
 #0:  ("%s""kstrp"){+.+.}, at: [<ffffffff81364ee0>] process_one_work+0x6b0/0x14a0 kernel/workqueue.c:2088
 #1:  ((&strp->work)){+.+.}, at: [<ffffffff81364f16>] process_one_work+0x6e6/0x14a0 kernel/workqueue.c:2092

stack backtrace:
CPU: 1 PID: 34 Comm: kworker/u4:2 Not tainted 4.14.274-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Workqueue: kstrp strp_work
Call Trace:
 __dump_stack lib/dump_stack.c:17 [inline]
 dump_stack+0x1b2/0x281 lib/dump_stack.c:58
 print_circular_bug.constprop.0.cold+0x2d7/0x41e kernel/locking/lockdep.c:1258
 check_prev_add kernel/locking/lockdep.c:1905 [inline]
 check_prevs_add kernel/locking/lockdep.c:2022 [inline]
 validate_chain kernel/locking/lockdep.c:2464 [inline]
 __lock_acquire+0x2e0e/0x3f20 kernel/locking/lockdep.c:3491
 lock_acquire+0x170/0x3f0 kernel/locking/lockdep.c:3998
 lock_sock_nested+0xb7/0x100 net/core/sock.c:2813
 do_strp_work net/strparser/strparser.c:415 [inline]
 strp_work+0x3e/0x100 net/strparser/strparser.c:434
 process_one_work+0x793/0x14a0 kernel/workqueue.c:2117
 worker_thread+0x5cc/0xff0 kernel/workqueue.c:2251
 kthread+0x30d/0x420 kernel/kthread.c:232
 ret_from_fork+0x24/0x30 arch/x86/entry/entry_64.S:404
BTRFS info (device loop3): checking UUID tree
BTRFS warning (device loop3): failed to start uuid_rescan task
BTRFS warning (device loop3): failed to check the UUID tree: -4
BTRFS error (device loop3): open_ctree failed
audit: type=1804 audit(1648472680.982:4): pid=9831 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.1" name="/root/syzkaller-testdir2506111357/syzkaller.09zNiz/8/bus" dev="sda1" ino=13956 res=1
omfs: Invalid superblock (0)
qnx6: invalid mount options.
qnx6: invalid mount options.
audit: type=1804 audit(1648472681.152:5): pid=9864 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.1" name="/root/syzkaller-testdir2506111357/syzkaller.09zNiz/9/bus" dev="sda1" ino=13939 res=1
qnx6: invalid mount options.
EXT4-fs (loop4): mounted filesystem without journal. Opts: ,errors=continue
BTRFS info (device loop3): max_inline at 2
BTRFS info (device loop3): disk space caching is enabled
BTRFS info (device loop3): has skinny extents
BTRFS info (device loop3): checking UUID tree
qnx6: invalid mount options.
BTRFS info (device loop3): max_inline at 2
BTRFS info (device loop3): disk space caching is enabled
BTRFS info (device loop3): has skinny extents
BTRFS info (device loop3): checking UUID tree
EXT4-fs (loop2): mounted filesystem without journal. Opts: ,errors=continue
EXT4-fs (loop4): mounted filesystem without journal. Opts: ,errors=continue
EXT4-fs (loop4): mounted filesystem without journal. Opts: ,errors=continue
EXT4-fs (loop2): mounted filesystem without journal. Opts: ,errors=continue
EXT4-fs (loop4): mounted filesystem without journal. Opts: ,errors=continue
EXT4-fs (loop2): mounted filesystem without journal. Opts: ,errors=continue
audit: type=1804 audit(1648472684.262:6): pid=10151 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.1" name="/root/syzkaller-testdir2506111357/syzkaller.09zNiz/19/bus" dev="sda1" ino=13897 res=1
audit: type=1800 audit(1648472684.262:7): pid=10151 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.1" name="bus" dev="sda1" ino=13897 res=0
syz-executor.3 (10193) used greatest stack depth: 24968 bytes left
audit: type=1804 audit(1648472685.132:8): pid=10242 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.1" name="/root/syzkaller-testdir2506111357/syzkaller.09zNiz/20/bus" dev="sda1" ino=13998 res=1
audit: type=1800 audit(1648472685.132:9): pid=10242 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.1" name="bus" dev="sda1" ino=13998 res=0
audit: type=1804 audit(1648472685.512:10): pid=10265 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.5" name="/root/syzkaller-testdir2905022398/syzkaller.utKACk/19/bus" dev="sda1" ino=13989 res=1
audit: type=1800 audit(1648472685.512:11): pid=10265 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.5" name="bus" dev="sda1" ino=13989 res=0
syz-executor.4 (10254) used greatest stack depth: 24576 bytes left
audit: type=1804 audit(1648472686.902:12): pid=10299 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.2" name="/root/syzkaller-testdir574762897/syzkaller.l3O8Jg/21/bus" dev="sda1" ino=14014 res=1
audit: type=1800 audit(1648472686.902:13): pid=10299 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.2" name="bus" dev="sda1" ino=14014 res=0
audit: type=1804 audit(1648472686.992:14): pid=10300 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.1" name="/root/syzkaller-testdir2506111357/syzkaller.09zNiz/21/bus" dev="sda1" ino=14015 res=1
audit: type=1800 audit(1648472686.992:15): pid=10300 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.1" name="bus" dev="sda1" ino=14015 res=0
audit: type=1804 audit(1648472688.312:16): pid=10311 uid=0 auid=4294967295 ses=4294967295 op="invalid_pcr" cause="open_writers" comm="syz-executor.2" name="/root/syzkaller-testdir574762897/syzkaller.l3O8Jg/22/bus" dev="sda1" ino=14018 res=1
unregister_netdevice: waiting for ip6gre0 to become free. Usage count = -1
audit: type=1800 audit(1648472688.312:17): pid=10311 uid=0 auid=4294967295 ses=4294967295 op="collect_data" cause="failed(directio)" comm="syz-executor.2" name="bus" dev="sda1" ino=14018 res=0
ICMPv6: NA: someone advertises our address fe80:0000:0000:0000:0000:0000:0000:00aa on syz_tun!
ICMPv6: NA: someone advertises our address fe80:0000:0000:0000:0000:0000:0000:00aa on syz_tun!
ICMPv6: NA: someone advertises our address fe80:0000:0000:0000:0000:0000:0000:00aa on syz_tun!
ICMPv6: NA: someone advertises our address fe80:0000:0000:0000:0000:0000:0000:00aa on syz_tun!
hfs: umask requires a value
hfs: unable to parse mount options
hfs: umask requires a value
hfs: unable to parse mount options