FYI, we noticed the following commit (built with gcc-7): commit: 7c7e301406d0a93051d236600a72066278c2e4dc ("btrfs: sysfs: Replace default_attrs in ktypes with groups") https://git.kernel.org/cgit/linux/kernel/git/gregkh/driver-core.git driver-core-testing in testcase: xfstests with following parameters: disk: 6HDD fs: btrfs test: btrfs-group1 test-description: xfstests is a regression test suite for xfs and other files ystems. test-url: git://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git on test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 4G caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace): +------------------------------------------------------+------------+------------+ | | d252768216 | 7c7e301406 | +------------------------------------------------------+------------+------------+ | boot_successes | 3 | 0 | | boot_failures | 20 | 32 | | BUG:kernel_reboot-without-warning_in_test_stage | 19 | 4 | | BUG:kernel_NULL_pointer_dereference,address | 1 | | | Oops:#[##] | 1 | | | RIP:raid#_sse21_gen_syndrome[raid#_pq] | 1 | | | Kernel_panic-not_syncing:Fatal_exception | 1 | | | WARNING:at_fs/kernfs/dir.c:#kernfs_remove_by_name_ns | 0 | 28 | | RIP:kernfs_remove_by_name_ns | 0 | 28 | +------------------------------------------------------+------------+------------+ If you fix the issue, kindly add following tag Reported-by: kernel test robot [ 326.982029] WARNING: CPU: 1 PID: 5231 at fs/kernfs/dir.c:1505 kernfs_remove_by_name_ns+0x84/0x90 [ 326.984875] Modules linked in: btrfs xor zstd_decompress zstd_compress raid6_pq libcrc32c dm_mod sr_mod cdrom crct10dif_pclmul sg crc32_pclmul crc32c_intel ata_generic pata_acpi ghash_clmulni_intel ppdev snd_pcm ata_piix aesni_intel snd_timer bochs_drm snd ttm crypto_simd drm_kms_helper cryptd joydev glue_helper libata syscopyarea sysfillrect soundcore sysimgblt serio_raw fb_sys_fops pcspkr drm i2c_piix4 floppy parport_pc parport ip_tables [ 326.996328] CPU: 1 PID: 5231 Comm: umount Not tainted 5.2.0-rc3-00058-g7c7e301406d0a #1 [ 326.998371] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1 04/01/2014 [ 327.000473] RIP: 0010:kernfs_remove_by_name_ns+0x84/0x90 [ 327.002110] Code: 00 31 c0 5b 5d 41 5c c3 48 c7 c7 20 a4 32 8b e8 d2 27 70 00 b8 fe ff ff ff 5b 5d 41 5c c3 48 c7 c7 18 8a ef 8a e8 7c 81 d4 ff <0f> 0b b8 fe ff ff ff eb d0 0f 1f 00 66 66 66 66 90 41 57 41 56 41 [ 327.006665] RSP: 0018:ffffab59834bfd60 EFLAGS: 00010282 [ 327.008340] RAX: 0000000000000000 RBX: ffffffffc05924b8 RCX: 0000000000000000 [ 327.010327] RDX: ffff97273fd26d40 RSI: ffff97273fd17778 RDI: ffff97273fd17778 [ 327.012326] RBP: ffffffffc053c818 R08: 00000000000004a1 R09: 0000000000aaaaaa [ 327.014338] R10: ffffd09d01f8bb40 R11: ffff97271c40f520 R12: ffffffffc0535000 [ 327.016365] R13: ffff972678ae25e0 R14: ffff97267e10a9c8 R15: dead000000000100 [ 327.018411] FS: 00007fe85f144e40(0000) GS:ffff97273fd00000(0000) knlGS:0000000000000000 [ 327.020627] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 327.022473] CR2: 00000000004216d0 CR3: 000000007c81e000 CR4: 00000000000406e0 [ 327.024539] Call Trace: [ 327.025934] remove_files+0x30/0x70 [ 327.027530] sysfs_remove_group+0x3d/0x80 [ 327.029104] sysfs_remove_groups+0x29/0x40 [ 327.030697] kobject_del+0x20/0x60 [ 327.032213] btrfs_free_block_groups+0x335/0x420 [btrfs] [ 327.034019] close_ctree+0x17a/0x300 [btrfs] [ 327.035619] generic_shutdown_super+0x6c/0x120 [ 327.037270] kill_anon_super+0xe/0x30 [ 327.038823] btrfs_kill_super+0x12/0xa0 [btrfs] [ 327.040484] deactivate_locked_super+0x3f/0x70 [ 327.042143] cleanup_mnt+0x3b/0x80 [ 327.043655] task_work_run+0xa3/0xe0 [ 327.047924] exit_to_usermode_loop+0xeb/0xf0 [ 327.049515] do_syscall_64+0x1a7/0x1e0 [ 327.051022] entry_SYSCALL_64_after_hwframe+0x44/0xa9 [ 327.052729] RIP: 0033:0x7fe85ea28d77 [ 327.054183] Code: 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 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 8b 0d f1 00 2b 00 f7 d8 64 89 01 48 [ 327.058914] RSP: 002b:00007fff3462bf78 EFLAGS: 00000246 ORIG_RAX: 00000000000000a6 [ 327.061036] RAX: 0000000000000000 RBX: 000055c942629080 RCX: 00007fe85ea28d77 [ 327.063153] RDX: 0000000000000001 RSI: 0000000000000000 RDI: 000055c942629260 [ 327.065213] RBP: 000055c942629260 R08: 000055c94262a600 R09: 0000000000000015 [ 327.067315] R10: 00000000000006b4 R11: 0000000000000246 R12: 00007fe85ef2ae64 [ 327.069427] R13: 0000000000000000 R14: 0000000000000000 R15: 00007fff3462c200 [ 327.071527] ---[ end trace 83bb75461b78c5f8 ]--- To reproduce: # build kernel cd linux cp config-5.2.0-rc3-00058-g7c7e301406d0a .config make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 olddefconfig make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 prepare make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 modules_prepare make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 SHELL=/bin/bash make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 bzImage git clone https://github.com/intel/lkp-tests.git cd lkp-tests find lib/ | cpio -o -H newc --quiet | gzip > modules.cgz bin/lkp qemu -k -m modules.cgz job-script # job-script is attached in this email Thanks, Rong Chen