syzbot


BUG: sleeping function called from invalid context in __kmalloc

Status: fixed on 2020/04/15 17:19
Subsystems: ceph fs
[Documentation on labels]
Reported-by: syzbot+98704a51af8e3d9425a9@syzkaller.appspotmail.com
Fix commit: b27a939e8376 ceph: canonicalize server path in place
First crash: 1532d, last: 1525d
Cause bisection: introduced by (bisect log) :
commit 4fbc0c711b2464ee1551850b85002faae0b775d5
Author: Xiubo Li <xiubli@redhat.com>
Date: Fri Dec 20 14:34:04 2019 +0000

  ceph: remove the extra slashes in the server path

Crash: BUG: sleeping function called from invalid context in __kmalloc (log)
Repro: C syz .config
  
Discussions (7)
Title Replies (including bot) Last reply
[PATCH 4.19 00/54] 4.19.115-rc1 review 70 (70) 2020/05/27 20:33
[PATCH 5.5 00/44] 5.5.17-rc1 review 48 (48) 2020/04/14 10:36
[PATCH 5.4 00/41] 5.4.32-rc1 review 45 (45) 2020/04/14 10:36
[PATCH 4.14 00/38] 4.14.176-rc1 review 44 (44) 2020/04/14 10:36
[PATCH 4.9 00/32] 4.9.219-rc1 review 36 (36) 2020/04/14 10:35
[PATCH] ceph: fix allocation under spinlock in mount option parsing 3 (3) 2020/02/11 09:15
BUG: sleeping function called from invalid context in __kmalloc 2 (5) 2020/02/07 21:58

Sample crash report:
BUG: sleeping function called from invalid context at mm/slab.h:565
in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 11179, name: syz-executor391
1 lock held by syz-executor391/11179:
 #0: ffffffff89c774f8 (sb_lock){+.+.}, at: spin_lock include/linux/spinlock.h:338 [inline]
 #0: ffffffff89c774f8 (sb_lock){+.+.}, at: sget_fc+0xde/0x810 fs/super.c:521
Preemption disabled at:
[<ffffffff81bf9f1e>] spin_lock include/linux/spinlock.h:338 [inline]
[<ffffffff81bf9f1e>] sget_fc+0xde/0x810 fs/super.c:521
CPU: 0 PID: 11179 Comm: syz-executor391 Not tainted 5.6.0-rc1-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
 __dump_stack lib/dump_stack.c:77 [inline]
 dump_stack+0x197/0x210 lib/dump_stack.c:118
 ___might_sleep.cold+0x1fb/0x23e kernel/sched/core.c:6800
 __might_sleep+0x95/0x190 kernel/sched/core.c:6753
 slab_pre_alloc_hook mm/slab.h:565 [inline]
 slab_alloc mm/slab.c:3306 [inline]
 __do_kmalloc mm/slab.c:3654 [inline]
 __kmalloc+0x2d5/0x770 mm/slab.c:3665
 kmalloc include/linux/slab.h:560 [inline]
 path_remove_extra_slash.part.0+0xd3/0x2e0 fs/ceph/super.c:489
 path_remove_extra_slash fs/ceph/super.c:476 [inline]
 compare_mount_options fs/ceph/super.c:547 [inline]
 ceph_compare_super+0x248/0x610 fs/ceph/super.c:1046
 sget_fc+0x207/0x810 fs/super.c:524
 ceph_get_tree+0x633/0x16c0 fs/ceph/super.c:1121
 vfs_get_tree+0x8e/0x300 fs/super.c:1547
 do_new_mount fs/namespace.c:2822 [inline]
 do_mount+0x135a/0x1b50 fs/namespace.c:3107
 __do_sys_mount fs/namespace.c:3316 [inline]
 __se_sys_mount fs/namespace.c:3293 [inline]
 __x64_sys_mount+0x192/0x230 fs/namespace.c:3293
 do_syscall_64+0xfa/0x790 arch/x86/entry/common.c:294
 entry_SYSCALL_64_after_hwframe+0x49/0xbe
RIP: 0033:0x441289
Code: e8 ac e8 ff ff 48 83 c4 18 c3 0f 1f 80 00 00 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 0f 83 eb 08 fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffeeea10138 EFLAGS: 00000246 ORIG_RAX: 00000000000000a5
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000441289
RDX: 0000000020000140 RSI: 00000000200000c0 RDI: 0000000020000040
RBP: 00000000006cb018 R08: 0000000000000000 R09: 00000000004002c8
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000402000
R13: 0000000000402090 R14: 0000000000000000 R15: 0000000000000000
ceph: No mds server is up or the cluster is laggy

Crashes (5):
Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Assets (help?) Manager Title
2020/02/10 23:55 upstream bb6d3fb354c5 18847f55 .config console log report syz C ci-upstream-kasan-gce-selinux-root
2020/02/07 17:43 upstream 90568ecf5615 06150bf1 .config console log report syz C ci-upstream-kasan-gce-smack-root
2020/02/14 05:32 upstream 0bf999f9c5e7 c5ed587f .config console log report ci-upstream-kasan-gce-smack-root
2020/02/14 05:16 upstream 0bf999f9c5e7 c5ed587f .config console log report ci-upstream-kasan-gce-smack-root
2020/02/07 17:13 upstream 90568ecf5615 06150bf1 .config console log report ci-upstream-kasan-gce-smack-root
* Struck through repros no longer work on HEAD.