Greeting,
FYI, we noticed WARNING:at_fs/sysfs/group.c:#sysfs_remove_group due to commit (built with gcc-11):
commit: 19c2a61fbefdd9fc68a6791dad0a7dff9b7579c7 ("sysfs: do not create empty directories if no attributes are present")
https://git.kernel.org/cgit/linux/kernel/git/gregkh/driver-core.git debugfs_cleanup
in testcase: boot
on test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G
caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):
[ 2.191285][ T1] ------------[ cut here ]------------
[ 2.192135][ T1] sysfs group 'power' not found for kobject 'platform'
[ 2.193159][ T1] WARNING: CPU: 0 PID: 1 at fs/sysfs/group.c:291 sysfs_remove_group (fs/sysfs/group.c:291)
[ 2.194622][ T1] Modules linked in:
[ 2.195136][ T1] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.1.0-rc1-00037-g19c2a61fbefd #1
[ 2.196625][ T1] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.0-debian-1.16.0-4 04/01/2014
[ 2.197668][ T1] RIP: 0010:sysfs_remove_group (fs/sysfs/group.c:291)
[ 2.198466][ T1] Code: 48 89 d9 49 8b 14 24 48 b8 00 00 00 00 00 fc ff df 48 c1 e9 03 80 3c 01 00 75 3e 48 8b 33 48 c7 c7 40 3f d9 83 e8 6c 34 9f 01 <0f> 0b 48 83 c4 08 5b 5d 41 5c c3 e8 09 21 d6 ff e9 26 ff ff ff 48
All code
========
0: 48 89 d9 mov %rbx,%rcx
3: 49 8b 14 24 mov (%r12),%rdx
7: 48 b8 00 00 00 00 00 movabs $0xdffffc0000000000,%rax
e: fc ff df
11: 48 c1 e9 03 shr $0x3,%rcx
15: 80 3c 01 00 cmpb $0x0,(%rcx,%rax,1)
19: 75 3e jne 0x59
1b: 48 8b 33 mov (%rbx),%rsi
1e: 48 c7 c7 40 3f d9 83 mov $0xffffffff83d93f40,%rdi
25: e8 6c 34 9f 01 callq 0x19f3496
2a:* 0f 0b ud2 <-- trapping instruction
2c: 48 83 c4 08 add $0x8,%rsp
30: 5b pop %rbx
31: 5d pop %rbp
32: 41 5c pop %r12
34: c3 retq
35: e8 09 21 d6 ff callq 0xffffffffffd62143
3a: e9 26 ff ff ff jmpq 0xffffffffffffff65
3f: 48 rex.W
Code starting with the faulting instruction
===========================================
0: 0f 0b ud2
2: 48 83 c4 08 add $0x8,%rsp
6: 5b pop %rbx
7: 5d pop %rbp
8: 41 5c pop %r12
a: c3 retq
b: e8 09 21 d6 ff callq 0xffffffffffd62119
10: e9 26 ff ff ff jmpq 0xffffffffffffff3b
15: 48 rex.W
[ 2.200028][ T1] RSP: 0000:ffffc9000001fd00 EFLAGS: 00010282
[ 2.200463][ T1] RAX: 0000000000000000 RBX: ffffffff83f02f20 RCX: 0000000000000000
[ 2.201570][ T1] RDX: 0000000000000000 RSI: 1ffff92000003f69 RDI: fffff52000003f92
[ 2.202610][ T1] RBP: 0000000000000000 R08: 0000000000000000 R09: ffffc9000001fa37
[ 2.203576][ T1] R10: fffff52000003f46 R11: 0000000000000001 R12: ffffffff853cdca0
[ 2.204604][ T1] R13: ffffffff853cdd7c R14: ffffffff853cdce8 R15: ffffffff853cdca0
[ 2.205579][ T1] FS: 0000000000000000(0000) GS:ffff88839d600000(0000) knlGS:0000000000000000
[ 2.206625][ T1] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 2.207443][ T1] CR2: ffff88843ffff000 CR3: 0000000004a14000 CR4: 00000000000406f0
[ 2.208603][ T1] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 2.209617][ T1] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 2.210613][ T1] Call Trace:
[ 2.211137][ T1]
[ 2.211740][ T1] dpm_sysfs_add (drivers/base/power/sysfs.c:736)
[ 2.212422][ T1] device_add (drivers/base/core.c:3391)
[ 2.213137][ T1] ? memset (mm/kasan/shadow.c:44)
[ 2.213897][ T1] ? __fw_devlink_link_to_suppliers (drivers/base/core.c:3316)
[ 2.214437][ T1] ? pm_runtime_init (drivers/base/power/runtime.c:1724)
[ 2.215137][ T1] platform_bus_init (drivers/base/platform.c:1518)
[ 2.216009][ T1] driver_init (drivers/base/init.c:37)
[ 2.216430][ T1] kernel_init_freeable (init/main.c:1409 init/main.c:1631)
[ 2.217138][ T1] ? console_on_rootfs (init/main.c:1601)
[ 2.218094][ T1] ? usleep_range_state (kernel/time/timer.c:1897)
[ 2.218446][ T1] ? _raw_spin_lock_bh (kernel/locking/spinlock.c:169)
[ 2.219150][ T1] ? rest_init (init/main.c:1511)
[ 2.220013][ T1] ? rest_init (init/main.c:1511)
[ 2.220411][ T1] kernel_init (init/main.c:1521)
[ 2.221138][ T1] ret_from_fork (arch/x86/entry/entry_64.S:312)
[ 2.221999][ T1]
[ 2.222379][ T1] ---[ end trace 0000000000000000 ]---
If you fix the issue, kindly add following tag
| Reported-by: kernel test robot
| Link: https://lore.kernel.org/oe-lkp/202211181055.5bb2b139-yujie.liu@intel.com
To reproduce:
# build kernel
cd linux
cp config-6.1.0-rc1-00037-g19c2a61fbefd .config
make HOSTCC=gcc-11 CC=gcc-11 ARCH=x86_64 olddefconfig prepare modules_prepare bzImage modules
make HOSTCC=gcc-11 CC=gcc-11 ARCH=x86_64 INSTALL_MOD_PATH= modules_install
cd
find lib/ | cpio -o -H newc --quiet | gzip > modules.cgz
git clone https://github.com/intel/lkp-tests.git
cd lkp-tests
bin/lkp qemu -k -m modules.cgz job-script # job-script is attached in this email
# if come across any failure that blocks the test,
# please remove ~/.lkp and /lkp dir to run from a clean state.
--
0-DAY CI Kernel Test Service
https://01.org/lkp