syzbot


BUG: spinlock bad magic in writeback_single_inode

Status: upstream: reported syz repro on 2022/11/14 09:56
Reported-by: syzbot+7b2e428bac8cb2ca2f49@syzkaller.appspotmail.com
First crash: 16d, last: 4d18h

Sample crash report:
ntfs3: loop5: Different NTFS' sector size (1024) and media sector size (512)
BUG: spinlock bad magic on CPU#0, syz-executor.5/5077
Unable to handle kernel NULL pointer dereference at virtual address 0000000000000470
Mem abort info:
  ESR = 0x0000000096000006
  EC = 0x25: DABT (current EL), IL = 32 bits
  SET = 0, FnV = 0
  EA = 0, S1PTW = 0
  FSC = 0x06: level 2 translation fault
Data abort info:
  ISV = 0, ISS = 0x00000006
  CM = 0, WnR = 0
user pgtable: 4k pages, 48-bit VAs, pgdp=000000011343b000
[0000000000000470] pgd=0800000112346003, p4d=0800000112346003, pud=08000001135b3003, pmd=0000000000000000
Internal error: Oops: 0000000096000006 [#1] PREEMPT SMP
Modules linked in:
CPU: 0 PID: 5077 Comm: syz-executor.5 Not tainted 6.1.0-rc4-syzkaller-31872-g1621b6eaebf7 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/30/2022
pstate: a0400005 (NzCv daif +PAN -UAO -TCO -DIT -SSBS BTYPE=--)
pc : task_pid_nr include/linux/sched.h:1568 [inline]
pc : spin_dump kernel/locking/spinlock_debug.c:63 [inline]
pc : spin_bug+0x88/0xec kernel/locking/spinlock_debug.c:77
lr : spin_dump kernel/locking/spinlock_debug.c:60 [inline]
lr : spin_bug+0x68/0xec kernel/locking/spinlock_debug.c:77
sp : ffff800016e73940
x29: ffff800016e73940 x28: ffffffffffffffff x27: 0000000000000140
x26: 0000000000000002 x25: 0000000000000000 x24: 0000000000000001
x23: ffff800016e73a60 x22: 0000000000000000 x21: ffffffffffffff00
x20: ffff80000cb4a08d x19: ffff0000d12af157 x18: 00000000000000c0
x17: ffff80000dcdc198 x16: 0000000000000002 x15: 0000000000000000
x14: 0000000000000000 x13: 205d373730355420 x12: 5b5d343333323131
x11: ff808000081c06c8 x10: 0000000000000000 x9 : 824be9ae2b942600
x8 : ffffffffffffff01 x7 : 205b5d3433333231 x6 : ffff80000c01775c
x5 : 0000000000000000 x4 : 0000000000000001 x3 : 0000000000000000
x2 : 00000000ad4ead00 x1 : 0000000000000001 x0 : 0000000000000035
Call trace:
 spin_bug+0x88/0xec kernel/locking/spinlock_debug.c:77
 debug_spin_lock_before kernel/locking/spinlock_debug.c:85 [inline]
 do_raw_spin_lock+0xb0/0x110 kernel/locking/spinlock_debug.c:114
 __raw_spin_lock include/linux/spinlock_api_smp.h:134 [inline]
 _raw_spin_lock+0x5c/0x6c kernel/locking/spinlock.c:154
 spin_lock include/linux/spinlock.h:350 [inline]
 writeback_single_inode+0x44/0x54c fs/fs-writeback.c:1676
 write_inode_now+0xb0/0xdc fs/fs-writeback.c:2736
 iput_final fs/inode.c:1734 [inline]
 iput+0x1e4/0x324 fs/inode.c:1773
 ntfs_fill_super+0x1254/0x14a4 fs/ntfs3/super.c:1190
 get_tree_bdev+0x1e8/0x2a0 fs/super.c:1324
 ntfs_fs_get_tree+0x28/0x38 fs/ntfs3/super.c:1358
 vfs_get_tree+0x40/0x140 fs/super.c:1531
 do_new_mount+0x1dc/0x4e4 fs/namespace.c:3040
 path_mount+0x358/0x890 fs/namespace.c:3370
 do_mount fs/namespace.c:3383 [inline]
 __do_sys_mount fs/namespace.c:3591 [inline]
 __se_sys_mount fs/namespace.c:3568 [inline]
 __arm64_sys_mount+0x2c4/0x3c4 fs/namespace.c:3568
 __invoke_syscall arch/arm64/kernel/syscall.c:38 [inline]
 invoke_syscall arch/arm64/kernel/syscall.c:52 [inline]
 el0_svc_common+0x138/0x220 arch/arm64/kernel/syscall.c:142
 do_el0_svc+0x48/0x164 arch/arm64/kernel/syscall.c:206
 el0_svc+0x58/0x150 arch/arm64/kernel/entry-common.c:637
 el0t_64_sync_handler+0x84/0xf0 arch/arm64/kernel/entry-common.c:655
 el0t_64_sync+0x190/0x194 arch/arm64/kernel/entry.S:584
Code: b0025463 12800004 91238c63 14000003 (b94572a4) 
---[ end trace 0000000000000000 ]---
----------------
Code disassembly (best guess):
   0:	b0025463 	adrp	x3, 0x4a8d000
   4:	12800004 	mov	w4, #0xffffffff            	// #-1
   8:	91238c63 	add	x3, x3, #0x8e3
   c:	14000003 	b	0x18
* 10:	b94572a4 	ldr	w4, [x21, #1392] <-- trapping instruction

Crashes (3):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-gce-arm64 2022/11/10 10:01 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 1621b6eaebf7 b2488a87 .config log report syz BUG: spinlock bad magic in writeback_single_inode
ci-upstream-gce-arm64 2022/11/22 08:04 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci a77d28d13789 1c576c23 .config log report info BUG: spinlock bad magic in writeback_single_inode
ci-upstream-gce-arm64 2022/11/10 09:45 git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-kernelci 1621b6eaebf7 b2488a87 .config log report info BUG: spinlock bad magic in writeback_single_inode
* Struck through repros no longer work on HEAD.