syzbot


WARNING in p9_client_destroy

Status: upstream: reported syz repro on 2022/02/28 00:53
Reported-by: syzbot+5e28cdb7ebd0f2389ca4@syzkaller.appspotmail.com
First crash: 221d, last: 39d

Cause bisection: introduced by (bisect log) :
commit 7302e91f39a81a9c2efcf4bc5749d18128366945
Author: Marco Elver <elver@google.com>
Date: Fri Jan 14 22:03:58 2022 +0000

  mm/slab_common: use WARN() if cache still has objects on destroy

Crash: WARNING in p9_client_destroy (log)
Repro: syz .config
Patch testing requests:
Created Duration User Patch Repo Result
2022/07/25 12:19 15m hdanton@sina.com patch https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git cb71b93c2dc3 report log
2022/07/25 11:21 10m hdanton@sina.com patch https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git cb71b93c2dc3 report log
2022/07/24 12:55 5m hdanton@sina.com patch https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git cb71b93c2dc3 error

Sample crash report:
------------[ cut here ]------------
kmem_cache_destroy 9p-fcall-cache: Slab cache still has objects when called from p9_client_destroy+0x213/0x370 net/9p/client.c:1100
WARNING: CPU: 0 PID: 3711 at mm/slab_common.c:506 kmem_cache_destroy mm/slab_common.c:506 [inline]
WARNING: CPU: 0 PID: 3711 at mm/slab_common.c:506 kmem_cache_destroy+0x13b/0x140 mm/slab_common.c:494
Modules linked in:

CPU: 0 PID: 3711 Comm: syz-executor.3 Not tainted 5.19.0-rc8-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/29/2022
RIP: 0010:kmem_cache_destroy mm/slab_common.c:506 [inline]
RIP: 0010:kmem_cache_destroy+0x13b/0x140 mm/slab_common.c:494
Code: 0f 49 0f 48 89 ee e8 c4 89 18 00 eb c1 c3 48 8b 55 58 48 c7 c6 a0 9a d7 89 48 c7 c7 f8 94 61 8b 48 8b 4c 24 18 e8 21 36 85 07 <0f> 0b eb a0 90 48 85 f6 74 46 41 55 49 89 d5 41 54 49 89 f4 55 48
RSP: 0018:ffffc90003357cf0 EFLAGS: 00010282
RAX: 0000000000000000 RBX: 1ffff9200066afa5 RCX: 0000000000000000
RDX: ffff88807b95c1c0 RSI: ffffffff815ffd38 RDI: fffff5200066af90
RBP: ffff888077f6ac00 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000080000000 R11: 0000000000000001 R12: 0000000000000001
R13: ffffc90003357d68 R14: dffffc0000000000 R15: 0000000000000000
FS:  00005555569e2400(0000) GS:ffff8880b9a00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00005555573da848 CR3: 00000000747d7000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
 <TASK>
 p9_client_destroy+0x213/0x370 net/9p/client.c:1100
 v9fs_session_close+0x45/0x2d0 fs/9p/v9fs.c:504
 v9fs_kill_super+0x49/0x90 fs/9p/vfs_super.c:226
 deactivate_locked_super+0x94/0x160 fs/super.c:332
 deactivate_super+0xad/0xd0 fs/super.c:363
 cleanup_mnt+0x3a2/0x540 fs/namespace.c:1186
 task_work_run+0xdd/0x1a0 kernel/task_work.c:177
 resume_user_mode_work include/linux/resume_user_mode.h:49 [inline]
 exit_to_user_mode_loop kernel/entry/common.c:169 [inline]
 exit_to_user_mode_prepare+0x23c/0x250 kernel/entry/common.c:201
 __syscall_exit_to_user_mode_work kernel/entry/common.c:283 [inline]
 syscall_exit_to_user_mode+0x19/0x50 kernel/entry/common.c:294
 do_syscall_64+0x42/0xb0 arch/x86/entry/common.c:86
 entry_SYSCALL_64_after_hwframe+0x63/0xcd
RIP: 0033:0x7fcb54c8a677
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 b8 ff ff ff f7 d8 64 89 01 48
RSP: 002b:00007ffef3b3e4e8 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6
RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00007fcb54c8a677
RDX: 00007ffef3b3e5bb RSI: 000000000000000a RDI: 00007ffef3b3e5b0
RBP: 00007ffef3b3e5b0 R08: 00000000ffffffff R09: 00007ffef3b3e380
R10: 00005555569e38b3 R11: 0000000000000246 R12: 00007fcb54ce22a6
R13: 00007ffef3b3f670 R14: 00005555569e3810 R15: 00007ffef3b3f6b0
 </TASK>

Fix bisection attempts:
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-selinux-root 2022/08/25 17:17 upstream c40e8341e3b3 34795c51 .config log report syz
* Struck through repros no longer work on HEAD.
Crashes (5):
Manager Time Kernel Commit Syzkaller Config Log Report Syz repro C repro VM info Title
ci-upstream-kasan-gce-selinux-root 2022/07/26 14:56 upstream e0dccc3b76fb 34795c51 .config log report syz WARNING in p9_client_destroy
ci-upstream-linux-next-kasan-gce-root 2022/07/24 08:28 linux-next cb71b93c2dc3 22343af4 .config log report syz WARNING in p9_client_destroy
ci-upstream-kasan-gce-selinux-root 2022/07/23 17:50 upstream 70664fc10c0d 22343af4 .config log report info WARNING in p9_client_destroy
ci-qemu-upstream 2022/02/24 00:44 upstream 23d04328444a 6e821dbf .config log report info WARNING in p9_client_destroy
ci-qemu-upstream-386 2022/04/04 11:23 upstream 312310928417 79a2a8fc .config log report info WARNING in p9_client_destroy
* Struck through repros no longer work on HEAD.