[Cluster-devel] [syzbot] kernel BUG in gfs2_glock_nq

2021-12-06 Thread syzbot
Hello,

syzbot found the following issue on:

HEAD commit:136057256686 Linux 5.16-rc2
git tree:   upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=15bda5b2b0
kernel config:  https://syzkaller.appspot.com/x/.config?x=bf85c53718a1e697
dashboard link: https://syzkaller.appspot.com/bug?extid=96502fc81e6d27a52341
compiler:   gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for 
Debian) 2.35.2

Unfortunately, I don't have any reproducer for this issue yet.

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+96502fc81e6d27a52...@syzkaller.appspotmail.com

gfs2: fsid=syz:syz.0: G:  s:EX n:8/1 f:qb t:EX d:EX/0 a:0 v:0 r:5 m:20 p:0
gfs2: fsid=syz:syz.0:  H: s:EX f:cH e:0 p:3725 [syz-executor.1] 
gfs2_quota_sync+0x2e2/0x660 fs/gfs2/quota.c:1310
[ cut here ]
kernel BUG at fs/gfs2/glock.c:1548!
invalid opcode:  [#1] PREEMPT SMP KASAN
CPU: 1 PID: 3725 Comm: syz-executor.1 Not tainted 5.16.0-rc2-syzkaller #0
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.14.0-2 04/01/2014
RIP: 0010:add_to_queue fs/gfs2/glock.c:1548 [inline]
RIP: 0010:gfs2_glock_nq.cold+0x2a1/0x2fa fs/gfs2/glock.c:1572
Code: 74 04 3c 03 7e 76 8b 53 18 44 89 e9 4c 89 f6 48 c7 c7 60 58 f6 89 e8 88 
3d f3 ff ba 01 00 00 00 4c 89 e6 31 ff e8 10 aa 57 fa <0f> 0b e8 19 64 af f8 4c 
8b 04 24 e9 7f fd ff ff 45 31 ff e9 fc fd
RSP: :c90001f1fae8 EFLAGS: 00010282
RAX:  RBX: 88806f9aec80 RCX: 
RDX: 88804b334240 RSI: 83656106 RDI: 89f68dc8
RBP: 888018610238 R08:  R09: 0001
R10: 836560b2 R11:  R12: 88806f9aec80
R13: 0001 R14: 8880765592c0 R15: 0001
FS:  57540400() GS:88802cb0() knlGS:
CS:  0010 DS:  ES:  CR0: 80050033
CR2: 004cba71 CR3: 735b2000 CR4: 00150ee0
DR0:  DR1:  DR2: 
DR3:  DR6: fffe0ff0 DR7: 0400
Call Trace:
 
 gfs2_glock_nq_init fs/gfs2/glock.h:254 [inline]
 do_sync+0x4b9/0xcf0 fs/gfs2/quota.c:902
 gfs2_quota_sync+0x2e2/0x660 fs/gfs2/quota.c:1310
 gfs2_sync_fs+0x40/0xb0 fs/gfs2/super.c:642
 sync_filesystem fs/sync.c:56 [inline]
 sync_filesystem+0x105/0x260 fs/sync.c:30
 generic_shutdown_super+0x70/0x400 fs/super.c:448
 kill_block_super+0x97/0xf0 fs/super.c:1397
 gfs2_kill_sb+0x104/0x160 fs/gfs2/ops_fstype.c:1735
 deactivate_locked_super+0x94/0x160 fs/super.c:335
 deactivate_super+0xad/0xd0 fs/super.c:366
 cleanup_mnt+0x3a2/0x540 fs/namespace.c:1137
 task_work_run+0xdd/0x1a0 kernel/task_work.c:164
 tracehook_notify_resume include/linux/tracehook.h:189 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:175 [inline]
 exit_to_user_mode_prepare+0x27e/0x290 kernel/entry/common.c:207
 __syscall_exit_to_user_mode_work kernel/entry/common.c:289 [inline]
 syscall_exit_to_user_mode+0x19/0x60 kernel/entry/common.c:300
 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7ff8eb5b6f57
Code: ff ff ff f7 d8 64 89 01 48 83 c8 ff c3 66 0f 1f 44 00 00 31 f6 e9 09 00 
00 00 66 0f 1f 84 00 00 00 00 00 b8 a6 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 
c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:7ffca9da6618 EFLAGS: 0246 ORIG_RAX: 00a6
RAX:  RBX:  RCX: 7ff8eb5b6f57
RDX: 7ffca9da66eb RSI: 000a RDI: 7ffca9da66e0
RBP: 7ffca9da66e0 R08:  R09: 7ffca9da64b0
R10: 575418b3 R11: 0246 R12: 7ff8eb60f105
R13: 7ffca9da77a0 R14: 57541810 R15: 7ffca9da77e0
 
Modules linked in:
---[ end trace f8afb8dcf8bb318a ]---
RIP: 0010:add_to_queue fs/gfs2/glock.c:1548 [inline]
RIP: 0010:gfs2_glock_nq.cold+0x2a1/0x2fa fs/gfs2/glock.c:1572
Code: 74 04 3c 03 7e 76 8b 53 18 44 89 e9 4c 89 f6 48 c7 c7 60 58 f6 89 e8 88 
3d f3 ff ba 01 00 00 00 4c 89 e6 31 ff e8 10 aa 57 fa <0f> 0b e8 19 64 af f8 4c 
8b 04 24 e9 7f fd ff ff 45 31 ff e9 fc fd
RSP: :c90001f1fae8 EFLAGS: 00010282
RAX:  RBX: 88806f9aec80 RCX: 
RDX: 88804b334240 RSI: 83656106 RDI: 89f68dc8
RBP: 888018610238 R08:  R09: 0001
R10: 836560b2 R11:  R12: 88806f9aec80
R13: 0001 R14: 8880765592c0 R15: 0001
FS:  57540400() GS:88802cb0() knlGS:
CS:  0010 DS:  ES:  CR0: 80050033
CR2: 004cba71 CR3: 735b2000 CR4: 00150ee0
DR0:  DR1:  DR2: 
DR3:  DR6: fffe0ff0 DR7: 0400


---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be re

[Cluster-devel] [syzbot] general protection fault in gfs2_evict_inode

2021-12-06 Thread syzbot
Hello,

syzbot found the following issue on:

HEAD commit:d4439a1189f9 Merge tag 'hsi-for-5.16' of git://git.kernel...
git tree:   upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=13fae7cab0
kernel config:  https://syzkaller.appspot.com/x/.config?x=7f2760850058fbfb
dashboard link: https://syzkaller.appspot.com/bug?extid=f77e2d1dc867b6accaf9
compiler:   gcc (Debian 10.2.1-6) 10.2.1 20210110, GNU ld (GNU Binutils for 
Debian) 2.35.2

Unfortunately, I don't have any reproducer for this issue yet.

IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+f77e2d1dc867b6acc...@syzkaller.appspotmail.com

R10:  R11: 0206 R12: 2000
R13: 2100 R14: 7f4836721000 R15: 20047a20
 
gfs2: fsid=syz:syz.0: can't read journal index: -5
general protection fault, probably for non-canonical address 
0xdc11:  [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0088-0x008f]
CPU: 1 PID: 25372 Comm: syz-executor.3 Not tainted 5.15.0-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 
01/01/2011
RIP: 0010:evict_linked_inode fs/gfs2/super.c:1331 [inline]
RIP: 0010:gfs2_evict_inode+0xbe2/0x2070 fs/gfs2/super.c:1386
Code: 03 80 3c 02 00 0f 85 d0 13 00 00 48 8b 9d 00 09 00 00 48 b8 00 00 00 00 
00 fc ff df 48 8d bb 8c 00 00 00 48 89 fa 48 c1 ea 03 <0f> b6 14 02 48 89 f8 83 
e0 07 83 c0 03 38 d0 7c 09 84 d2 74 05 e8
RSP: 0018:c90009bb77c8 EFLAGS: 00010217
RAX: dc00 RBX:  RCX: c9000b53c000
RDX: 0011 RSI: 836c5f71 RDI: 008c
RBP: 88803ae28000 R08:  R09: 88807115fb43
R10: 83666100 R11:  R12: 0001
R13: 88807115fcb8 R14: 8880959e5cd8 R15: 8880959e5828
FS:  7f4836721700() GS:8880b9d0() knlGS:
CS:  0010 DS:  ES:  CR0: 80050033
CR2: 7f2fb011f000 CR3: 22ee7000 CR4: 00350ee0
DR0:  DR1:  DR2: 
DR3:  DR6: 0ff0 DR7: 0600
Call Trace:
 
 evict+0x2ed/0x6b0 fs/inode.c:588
 iput_final fs/inode.c:1664 [inline]
 iput.part.0+0x539/0x850 fs/inode.c:1690
 iput+0x58/0x70 fs/inode.c:1680
 dentry_unlink_inode+0x2b1/0x460 fs/dcache.c:376
 __dentry_kill+0x3c0/0x640 fs/dcache.c:582
 dentry_kill fs/dcache.c:708 [inline]
 dput+0x738/0xbc0 fs/dcache.c:888
 gfs2_fill_super+0x2048/0x28a0 fs/gfs2/ops_fstype.c:1296
 get_tree_bdev+0x440/0x760 fs/super.c:1293
 gfs2_get_tree+0x4a/0x270 fs/gfs2/ops_fstype.c:1327
 vfs_get_tree+0x89/0x2f0 fs/super.c:1498
 do_new_mount fs/namespace.c:2988 [inline]
 path_mount+0x1320/0x1fa0 fs/namespace.c:3318
 do_mount fs/namespace.c:3331 [inline]
 __do_sys_mount fs/namespace.c:3539 [inline]
 __se_sys_mount fs/namespace.c:3516 [inline]
 __x64_sys_mount+0x27f/0x300 fs/namespace.c:3516
 do_syscall_x64 arch/x86/entry/common.c:50 [inline]
 do_syscall_64+0x35/0xb0 arch/x86/entry/common.c:80
 entry_SYSCALL_64_after_hwframe+0x44/0xae
RIP: 0033:0x7f48391ad01a
Code: 48 c7 c2 bc ff ff ff f7 d8 64 89 02 b8 ff ff ff ff eb d2 e8 b8 04 00 00 
0f 1f 84 00 00 00 00 00 49 89 ca b8 a5 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 
c3 48 c7 c1 bc ff ff ff f7 d8 64 89 01 48
RSP: 002b:7f4836720fa8 EFLAGS: 0206 ORIG_RAX: 00a5
RAX: ffda RBX: 2200 RCX: 7f48391ad01a
RDX: 2000 RSI: 2100 RDI: 7f4836721000
RBP: 7f4836721040 R08: 7f4836721040 R09: 2000
R10:  R11: 0206 R12: 2000
R13: 2100 R14: 7f4836721000 R15: 20047a20
 
Modules linked in:
---[ end trace 68c9d12f167f0520 ]---
RIP: 0010:evict_linked_inode fs/gfs2/super.c:1331 [inline]
RIP: 0010:gfs2_evict_inode+0xbe2/0x2070 fs/gfs2/super.c:1386
Code: 03 80 3c 02 00 0f 85 d0 13 00 00 48 8b 9d 00 09 00 00 48 b8 00 00 00 00 
00 fc ff df 48 8d bb 8c 00 00 00 48 89 fa 48 c1 ea 03 <0f> b6 14 02 48 89 f8 83 
e0 07 83 c0 03 38 d0 7c 09 84 d2 74 05 e8
RSP: 0018:c90009bb77c8 EFLAGS: 00010217
RAX: dc00 RBX:  RCX: c9000b53c000
RDX: 0011 RSI: 836c5f71 RDI: 008c
RBP: 88803ae28000 R08:  R09: 88807115fb43
R10: 83666100 R11:  R12: 0001
R13: 88807115fcb8 R14: 8880959e5cd8 R15: 8880959e5828
FS:  7f4836721700() GS:8880b9d0() knlGS:
CS:  0010 DS:  ES:  CR0: 80050033
CR2: 7f2fb011f000 CR3: 22ee7000 CR4: 00350ee0
DR0:  DR1:  DR2: 
DR3:  DR6: 0ff0 DR7: 0600

Code disassembly (best guess):
   0:   03 80 3c 02 00 0f   add0xf00023c(%rax),%eax
   6:   85 d0