possible deadlock in ocfs2_xattr_set_handle (2)

Status: upstream: reported on 2026/10/15 07:48
Subsystems: ocfs2
Labels: prio:high
[Documentation on labels]
Reported-by: syzbot+b4732eab3dcd27c32ae6@syzkaller.appspotmail.com
First crash: 34d, last: 1d01h
▶ ▼ ✨ AI Jobs (3)
ID Workflow Result Correct Bug Created Started Finished Revision
cc5576e5 repro-c 💥 possible deadlock in ocfs2_xattr_set_handle (2) 2026/10/19 08:11 2026/10/19 08:11 2026/10/19 11:08 432c0077
6fa7ef7e repro-c 💥 possible deadlock in ocfs2_xattr_set_handle (2) 2026/10/17 20:10 2026/10/17 20:10 2026/10/17 23:35 432c0077
f0812c32 assessment-security DenialOfService: ❌ Exploitable: ❌ FilesystemTrigger: ✅ NetworkTrigger: ❌ PeripheralTrigger: ❌ RemoteTrigger: ❌ Unprivileged: ✅ UserNamespace: ✅ VMGuestTrigger: ✅ VMHostTrigger: ❌ ❓ possible deadlock in ocfs2_xattr_set_handle (2) 2026/10/13 10:52 2026/10/13 10:52 2026/10/13 11:25 745a967f
▶ ▼ Discussions (2)
Title Replies (including bot) Last reply
[syzbot] Monthly ocfs2 report (Nov 2026) 0 (1) 2026/11/12 20:33
[syzbot] [ocfs2?] possible deadlock in ocfs2_xattr_set_handle (2) 0 (1) 2026/10/15 07:48
▶ ▼ Similar bugs (1)
Kernel Title Rank 🛈 Repro Cause bisect Fix bisect Count Last Reported Patched Status
upstream possible deadlock in ocfs2_xattr_set_handle ocfs2 4 syz, C 2441 280d 787d 0/29 auto-obsoleted due to no activity on 2026/07/11 17:22

Sample crash report:
WARNING: possible circular locking dependency detected
syzkaller #0 Tainted: G             L     
------------------------------------------------------
syz.1.2302/15751 is trying to acquire lock:
ffff88807cc17658 (&oi->ip_alloc_sem/1){+.+.}-{4:4}, at: ocfs2_xattr_set_handle+0x315/0x690 fs/ocfs2/xattr.c:3941

but task is already holding lock:
ffff88807ef5ace0 (&journal->j_trans_barrier){.+.+}-{4:4}, at: ocfs2_start_trans+0x5c7/0x8e0 fs/ocfs2/journal.c:379

which lock already depends on the new lock.


the existing dependency chain (in reverse order) is:

-> #3 (&journal->j_trans_barrier){.+.+}-{4:4}:
       lock_acquire kernel/locking/lockdep.c:5942 [inline]
       lock_acquire+0x1d1/0x380 kernel/locking/lockdep.c:5899
       down_read+0x94/0x4c0 kernel/locking/rwsem.c:1574
       ocfs2_start_trans+0x5c7/0x8e0 fs/ocfs2/journal.c:379
       ocfs2_mknod+0x1538/0x2750 fs/ocfs2/namei.c:364
       ocfs2_create+0xf4/0x430 fs/ocfs2/namei.c:677
       lookup_open+0xd8a/0x19e0 fs/namei.c:4575
       open_last_lookups fs/namei.c:4774 [inline]
       path_openat+0xe75/0x23f0 fs/namei.c:5013
       do_file_open+0x20e/0x430 fs/namei.c:5045
       do_sys_openat2+0x163/0x1d0 fs/open.c:1443
       do_sys_open fs/open.c:1449 [inline]
       __do_sys_openat fs/open.c:1465 [inline]
       __se_sys_openat fs/open.c:1460 [inline]
       __x64_sys_openat+0x12d/0x210 fs/open.c:1460
       do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
       do_syscall_64+0x123/0x7b0 arch/x86/entry/syscall_64.c:89
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #2 (sb_internal#3){.+.+}-{0:0}:
       lock_acquire kernel/locking/lockdep.c:5942 [inline]
       lock_acquire+0x1d1/0x380 kernel/locking/lockdep.c:5899
       percpu_down_read_internal include/linux/percpu-rwsem.h:53 [inline]
       percpu_down_read_freezable include/linux/percpu-rwsem.h:83 [inline]
       __sb_start_write include/linux/fs/super.h:19 [inline]
       sb_start_intwrite include/linux/fs/super.h:177 [inline]
       ocfs2_start_trans+0x4b6/0x8e0 fs/ocfs2/journal.c:377
       ocfs2_xattr_set+0x12f5/0x29e0 fs/ocfs2/xattr.c:4092
       ocfs2_set_acl+0x469/0x550 fs/ocfs2/acl.c:254
       ocfs2_iop_set_acl+0x224/0x2d0 fs/ocfs2/acl.c:286
       set_posix_acl+0x263/0x320 fs/posix_acl.c:960
       vfs_set_acl+0x449/0xa80 fs/posix_acl.c:1139
       do_set_acl+0xd4/0x190 fs/posix_acl.c:1284
       do_setxattr+0xeb/0x180 fs/xattr.c:659
       filename_setxattr+0x167/0x1d0 fs/xattr.c:690
       path_setxattrat+0x1ff/0x3b0 fs/xattr.c:734
       __do_sys_setxattr fs/xattr.c:768 [inline]
       __se_sys_setxattr fs/xattr.c:764 [inline]
       __x64_sys_setxattr+0xc6/0x140 fs/xattr.c:764
       do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
       do_syscall_64+0x123/0x7b0 arch/x86/entry/syscall_64.c:89
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #1 (&ocfs2_sysfile_lock_key[EXTENT_ALLOC_SYSTEM_INODE]){+.+.}-{4:4}:
       lock_acquire kernel/locking/lockdep.c:5942 [inline]
       lock_acquire+0x1d1/0x380 kernel/locking/lockdep.c:5899
       down_write+0x86/0x1f0 kernel/locking/rwsem.c:1631
       inode_lock include/linux/fs.h:1027 [inline]
       ocfs2_reserve_suballoc_bits+0x11c/0x4b00 fs/ocfs2/suballoc.c:904
       ocfs2_reserve_new_metadata_blocks+0x506/0xbe0 fs/ocfs2/suballoc.c:1100
       ocfs2_create_refcount_tree+0x1f7/0x17d0 fs/ocfs2/refcounttree.c:627
       ocfs2_reflink_remap_blocks+0x720/0xd00 fs/ocfs2/refcounttree.c:4705
       ocfs2_remap_file_range+0x494/0x7e0 fs/ocfs2/file.c:2788
       vfs_copy_file_range+0x106d/0x1900 fs/read_write.c:1581
       __do_sys_copy_file_range+0x1a1/0x460 fs/read_write.c:1664
       do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
       do_syscall_64+0x123/0x7b0 arch/x86/entry/syscall_64.c:89
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

-> #0 (&oi->ip_alloc_sem/1){+.+.}-{4:4}:
       check_prev_add+0xeb/0xe60 kernel/locking/lockdep.c:3209
       check_prevs_add kernel/locking/lockdep.c:3328 [inline]
       validate_chain kernel/locking/lockdep.c:3952 [inline]
       __lock_acquire+0x1528/0x1f40 kernel/locking/lockdep.c:5288
       lock_acquire kernel/locking/lockdep.c:5942 [inline]
       lock_acquire+0x1d1/0x380 kernel/locking/lockdep.c:5899
       down_write_nested+0x8f/0x1f0 kernel/locking/rwsem.c:1757
       ocfs2_xattr_set_handle+0x315/0x690 fs/ocfs2/xattr.c:3941
       ocfs2_set_acl+0x379/0x550 fs/ocfs2/acl.c:250
       ocfs2_init_acl+0x3b3/0x430 fs/ocfs2/acl.c:428
       ocfs2_mknod+0x1657/0x2750 fs/ocfs2/namei.c:413
       ocfs2_mkdir+0xef/0x430 fs/ocfs2/namei.c:661
       vfs_mkdir+0x36d/0x8a0 fs/namei.c:5428
       filename_mkdirat+0x4c4/0x630 fs/namei.c:5461
       __do_sys_mkdirat fs/namei.c:5482 [inline]
       __se_sys_mkdirat fs/namei.c:5479 [inline]
       __x64_sys_mkdirat+0x89/0xc0 fs/namei.c:5479
       do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
       do_syscall_64+0x123/0x7b0 arch/x86/entry/syscall_64.c:89
       entry_SYSCALL_64_after_hwframe+0x77/0x7f

other info that might help us debug this:

Chain exists of:
  &oi->ip_alloc_sem/1 --> sb_internal#3 --> &journal->j_trans_barrier

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  rlock(&journal->j_trans_barrier);
                               lock(sb_internal#3);
                               lock(&journal->j_trans_barrier);
  lock(&oi->ip_alloc_sem/1);

 *** DEADLOCK ***

locks held by syz.1.2302/15751: 8, on CPU#1:
 #0: ffff888078a70478 (sb_writers#25){.+.+}-{0:0}, at: filename_create+0x10d/0x400 fs/namei.c:5101
 #1: ffff88804d15a5a0 (&type->i_mutex_dir_key#14/1){+.+.}-{4:4}, at: inode_lock_nested include/linux/fs.h:1072 [inline]
 #1: ffff88804d15a5a0 (&type->i_mutex_dir_key#14/1){+.+.}-{4:4}, at: __start_dirop fs/namei.c:2924 [inline]
 #1: ffff88804d15a5a0 (&type->i_mutex_dir_key#14/1){+.+.}-{4:4}, at: start_dirop fs/namei.c:2948 [inline]
 #1: ffff88804d15a5a0 (&type->i_mutex_dir_key#14/1){+.+.}-{4:4}, at: filename_create+0x1c0/0x400 fs/namei.c:5108
 #2: ffff888076a64fa0 (&ocfs2_sysfile_lock_key[INODE_ALLOC_SYSTEM_INODE]){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:1027 [inline]
 #2: ffff888076a64fa0 (&ocfs2_sysfile_lock_key[INODE_ALLOC_SYSTEM_INODE]){+.+.}-{4:4}, at: ocfs2_reserve_suballoc_bits+0x11c/0x4b00 fs/ocfs2/suballoc.c:904
 #3: ffff888076a641a0 (&ocfs2_sysfile_lock_key[EXTENT_ALLOC_SYSTEM_INODE]){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:1027 [inline]
 #3: ffff888076a641a0 (&ocfs2_sysfile_lock_key[EXTENT_ALLOC_SYSTEM_INODE]){+.+.}-{4:4}, at: ocfs2_reserve_suballoc_bits+0x11c/0x4b00 fs/ocfs2/suballoc.c:904
 #4: ffff888076a66ba0 (&ocfs2_sysfile_lock_key[LOCAL_ALLOC_SYSTEM_INODE]){+.+.}-{4:4}, at: inode_lock include/linux/fs.h:1027 [inline]
 #4: ffff888076a66ba0 (&ocfs2_sysfile_lock_key[LOCAL_ALLOC_SYSTEM_INODE]){+.+.}-{4:4}, at: ocfs2_reserve_local_alloc_bits+0xea/0xbe0 fs/ocfs2/localalloc.c:636
 #5: ffff888078a70668 (sb_internal#3){.+.+}-{0:0}, at: ocfs2_mknod+0x1538/0x2750 fs/ocfs2/namei.c:364
 #6: ffff88807ef5ace0 (&journal->j_trans_barrier){.+.+}-{4:4}, at: ocfs2_start_trans+0x5c7/0x8e0 fs/ocfs2/journal.c:379
 #7: ffff88807c4aa950 (jbd2_handle#2){.+.+}-{0:0}, at: start_this_handle+0xfa2/0x1390 fs/jbd2/transaction.c:444

stack backtrace:
CPU: 1 UID: 0 PID: 15751 Comm: syz.1.2302 Tainted: G             L      syzkaller #0 PREEMPT(full) 
Tainted: [L]=SOFTLOCKUP
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/06/2026
Call Trace:
 <TASK>
 __dump_stack lib/dump_stack.c:94 [inline]
 dump_stack_lvl+0x100/0x190 lib/dump_stack.c:120
 print_circular_bug.cold+0x178/0x1be kernel/locking/lockdep.c:2087
 check_noncircular+0x146/0x160 kernel/locking/lockdep.c:2219
 check_prev_add+0xeb/0xe60 kernel/locking/lockdep.c:3209
 check_prevs_add kernel/locking/lockdep.c:3328 [inline]
 validate_chain kernel/locking/lockdep.c:3952 [inline]
 __lock_acquire+0x1528/0x1f40 kernel/locking/lockdep.c:5288
 lock_acquire kernel/locking/lockdep.c:5942 [inline]
 lock_acquire+0x1d1/0x380 kernel/locking/lockdep.c:5899
 down_write_nested+0x8f/0x1f0 kernel/locking/rwsem.c:1757
 ocfs2_xattr_set_handle+0x315/0x690 fs/ocfs2/xattr.c:3941
 ocfs2_set_acl+0x379/0x550 fs/ocfs2/acl.c:250
 ocfs2_init_acl+0x3b3/0x430 fs/ocfs2/acl.c:428
 ocfs2_mknod+0x1657/0x2750 fs/ocfs2/namei.c:413
 ocfs2_mkdir+0xef/0x430 fs/ocfs2/namei.c:661
 vfs_mkdir+0x36d/0x8a0 fs/namei.c:5428
 filename_mkdirat+0x4c4/0x630 fs/namei.c:5461
 __do_sys_mkdirat fs/namei.c:5482 [inline]
 __se_sys_mkdirat fs/namei.c:5479 [inline]
 __x64_sys_mkdirat+0x89/0xc0 fs/namei.c:5479
 do_syscall_x64 arch/x86/entry/syscall_64.c:61 [inline]
 do_syscall_64+0x123/0x7b0 arch/x86/entry/syscall_64.c:89
 entry_SYSCALL_64_after_hwframe+0x77/0x7f
RIP: 0033:0x7fef25ba94d9
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:00007fef26a80028 EFLAGS: 00000246 ORIG_RAX: 0000000000000102
RAX: ffffffffffffffda RBX: 00007fef25e25fa0 RCX: 00007fef25ba94d9
RDX: 00000000000001ff RSI: 00002000000002c0 RDI: ffffffffffffff9c
RBP: 00007fef25c3804e R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: 00007fef25e26038 R14: 00007fef25e25fa0 R15: 00007ffd242dc578
 </TASK>
kcov: kcov_task_exit: t = ffff88805e6c5dc0, kcov->t = ffff88805e6c5dc0

Crashes (11):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2026/11/14 02:39 upstream 2800868f6322 be5d1971 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root possible deadlock in ocfs2_xattr_set_handle
2026/11/14 02:35 upstream 2800868f6322 be5d1971 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root possible deadlock in ocfs2_xattr_set_handle
2026/11/13 03:53 upstream 7e1392a42ea2 26b2fee0 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-kasan-badwrites-root possible deadlock in ocfs2_xattr_set_handle
2026/11/10 12:40 upstream b3dfbde62cf1 01625235 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in ocfs2_xattr_set_handle
2026/11/10 12:40 upstream b3dfbde62cf1 01625235 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in ocfs2_xattr_set_handle
2026/11/10 12:40 upstream b3dfbde62cf1 01625235 .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in ocfs2_xattr_set_handle
2026/11/07 08:32 upstream d48723711bae 5cecaf1f .config console log report [disk image (non-bootable)] [vmlinux] [kernel image] ci-snapshot-upstream-root possible deadlock in ocfs2_xattr_set_handle
2026/11/10 20:10 linux-next 630059a5a632 d3056657 .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in ocfs2_xattr_set_handle
2026/11/09 09:26 linux-next ddfe51b0a0f5 5cecaf1f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in ocfs2_xattr_set_handle
2026/11/07 04:18 linux-next ddfe51b0a0f5 5cecaf1f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in ocfs2_xattr_set_handle
2026/10/11 07:41 linux-next becb95e45ef0 4f92358f .config console log report info [disk image] [vmlinux] [kernel image] ci-upstream-linux-next-kasan-gce-root possible deadlock in ocfs2_xattr_set_handle
* Struck through repros no longer work on HEAD.