Hello, kernel test robot noticed "WARNING:at_lib/refcount.c:#refcount_warn_saturate" on: commit: 217b2119b9e260609958db413876f211038f00ee ("mm,page_owner: implement the tracking of the stacks count") https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git master [test failed on linux-next/master f303a3e2bcfba900efb5aee55236d17030e9f882] in testcase: boot compiler: clang-17 test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G (please refer to attached dmesg/kmsg for entire log/backtrace) +---------------------------------------------------+------------+------------+ | | 4bedfb314b | 217b2119b9 | +---------------------------------------------------+------------+------------+ | WARNING:at_lib/refcount.c:#refcount_warn_saturate | 0 | 6 | | RIP:refcount_warn_saturate | 0 | 6 | +---------------------------------------------------+------------+------------+ If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-lkp/202403011746.b71e99d5-lkp@xxxxxxxxx [ 4.132173][ T1] ------------[ cut here ]------------ [ 4.133153][ T1] refcount_t: decrement hit 0; leaking memory. [ 4.134206][ T1] WARNING: CPU: 1 PID: 1 at lib/refcount.c:31 refcount_warn_saturate (lib/refcount.c:31) [ 4.135726][ T1] Modules linked in: [ 4.136540][ T1] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 6.8.0-rc5-00257-g217b2119b9e2 #1 e0c7826819574aeba2e92ce6a75f2ad963cf125b [ 4.138506][ T1] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014 [ 4.140291][ T1] RIP: 0010:refcount_warn_saturate (lib/refcount.c:31) [ 4.141315][ T1] Code: 00 83 fb 04 0f 85 b8 00 00 00 80 3d 22 14 ce 02 00 0f 85 b4 00 00 00 c6 05 15 14 ce 02 01 48 c7 c7 e0 8d f0 83 e8 ea 30 b1 fe <0f> 0b e9 9a 00 00 00 85 db 74 6d 83 fb 01 0f 85 84 00 00 00 80 3d All code ======== 0: 00 83 fb 04 0f 85 add %al,-0x7af0fb05(%rbx) 6: b8 00 00 00 80 mov $0x80000000,%eax b: 3d 22 14 ce 02 cmp $0x2ce1422,%eax 10: 00 0f add %cl,(%rdi) 12: 85 b4 00 00 00 c6 05 test %esi,0x5c60000(%rax,%rax,1) 19: 15 14 ce 02 01 adc $0x102ce14,%eax 1e: 48 c7 c7 e0 8d f0 83 mov $0xffffffff83f08de0,%rdi 25: e8 ea 30 b1 fe call 0xfffffffffeb13114 2a:* 0f 0b ud2 <-- trapping instruction 2c: e9 9a 00 00 00 jmp 0xcb 31: 85 db test %ebx,%ebx 33: 74 6d je 0xa2 35: 83 fb 01 cmp $0x1,%ebx 38: 0f 85 84 00 00 00 jne 0xc2 3e: 80 .byte 0x80 3f: 3d .byte 0x3d Code starting with the faulting instruction =========================================== 0: 0f 0b ud2 2: e9 9a 00 00 00 jmp 0xa1 7: 85 db test %ebx,%ebx 9: 74 6d je 0x78 b: 83 fb 01 cmp $0x1,%ebx e: 0f 85 84 00 00 00 jne 0x98 14: 80 .byte 0x80 15: 3d .byte 0x3d [ 4.144492][ T1] RSP: 0000:ffffc9000001f910 EFLAGS: 00010246 [ 4.145506][ T1] RAX: 0000000000000000 RBX: 0000000000000004 RCX: 0000000000000000 [ 4.146847][ T1] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000 [ 4.151525][ T1] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000 [ 4.152918][ T1] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000 [ 4.154267][ T1] R13: 0000000000000000 R14: ffff88810129f82c R15: ffffea0004006440 [ 4.155622][ T1] FS: 0000000000000000(0000) GS:ffff8883af100000(0000) knlGS:0000000000000000 [ 4.157117][ T1] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 4.158206][ T1] CR2: 0000000000000000 CR3: 0000000004872000 CR4: 00000000000406b0 [ 4.159557][ T1] Call Trace: [ 4.160182][ T1] <TASK> [ 4.160753][ T1] ? __warn (kernel/panic.c:236 kernel/panic.c:677) [ 4.161495][ T1] ? refcount_warn_saturate (lib/refcount.c:31) [ 4.162430][ T1] ? refcount_warn_saturate (lib/refcount.c:31) [ 4.163372][ T1] ? report_bug (lib/bug.c:?) [ 4.164178][ T1] ? console_unlock (kernel/printk/printk.c:3055) [ 4.165032][ T1] ? handle_bug (arch/x86/kernel/traps.c:238) [ 4.165799][ T1] ? exc_invalid_op (arch/x86/kernel/traps.c:259) [ 4.166609][ T1] ? asm_exc_invalid_op (arch/x86/include/asm/idtentry.h:568) [ 4.167490][ T1] ? refcount_warn_saturate (lib/refcount.c:31) [ 4.168438][ T1] __free_pages_ok (include/linux/page_owner.h:?) [ 4.169280][ T1] make_alloc_exact (mm/page_alloc.c:4810) [ 4.170112][ T1] alloc_large_system_hash (mm/mm_init.c:2529) [ 4.171054][ T1] inet_hashinfo2_init (net/ipv4/inet_hashtables.c:1171) [ 4.171933][ T1] tcp_init (net/ipv4/tcp.c:4711) [ 4.172669][ T1] inet_init (net/ipv4/af_inet.c:2031) [ 4.173424][ T1] do_one_initcall (init/main.c:1237) [ 4.174255][ T1] ? ipv4_offload_init (include/net/raw.h:52 net/ipv4/af_inet.c:1961) [ 4.175119][ T1] ? kasan_save_track (arch/x86/include/asm/current.h:42 mm/kasan/common.c:60 mm/kasan/common.c:69) [ 4.175978][ T1] ? kasan_save_track (mm/kasan/common.c:48 mm/kasan/common.c:68) [ 4.176817][ T1] ? __kasan_kmalloc (mm/kasan/common.c:391) [ 4.177656][ T1] ? __kmalloc (include/linux/kasan.h:211 mm/slub.c:3981 mm/slub.c:3994) [ 4.178433][ T1] ? do_initcalls (init/main.c:1309) [ 4.179231][ T1] ? kernel_init_freeable (init/main.c:1557) [ 4.180152][ T1] ? kernel_init (init/main.c:1445) [ 4.180940][ T1] ? ret_from_fork (arch/x86/kernel/process.c:153) [ 4.181745][ T1] ? ret_from_fork_asm (arch/x86/entry/entry_64.S:250) [ 4.182620][ T1] ? parameq (include/linux/fortify-string.h:210 kernel/params.c:99) [ 4.183361][ T1] ? do_initcall_level (init/main.c:1284) [ 4.184245][ T1] ? parse_args (kernel/params.c:?) [ 4.185051][ T1] do_initcall_level (init/main.c:1298) [ 4.185906][ T1] ? kernel_init (init/main.c:1445) [ 4.186687][ T1] do_initcalls (init/main.c:1312) [ 4.187455][ T1] kernel_init_freeable (init/main.c:1557) [ 4.188362][ T1] ? rest_init (init/main.c:1441) [ 4.189145][ T1] kernel_init (init/main.c:1445) [ 4.189901][ T1] ? rest_init (init/main.c:1441) [ 4.190666][ T1] ret_from_fork (arch/x86/kernel/process.c:153) [ 4.191452][ T1] ? rest_init (init/main.c:1441) [ 4.192256][ T1] ret_from_fork_asm (arch/x86/entry/entry_64.S:250) [ 4.193098][ T1] </TASK> [ 4.193666][ T1] irq event stamp: 458467 [ 4.194429][ T1] hardirqs last enabled at (458477): console_unlock (arch/x86/include/asm/irqflags.h:42 arch/x86/include/asm/irqflags.h:77 arch/x86/include/asm/irqflags.h:135 kernel/printk/printk.c:341 kernel/printk/printk.c:2706 kernel/printk/printk.c:3038) [ 4.196026][ T1] hardirqs last disabled at (458488): console_unlock (kernel/printk/printk.c:339) [ 4.197593][ T1] softirqs last enabled at (458442): irq_exit_rcu (kernel/softirq.c:646) [ 4.199121][ T1] softirqs last disabled at (458437): irq_exit_rcu (kernel/softirq.c:646) [ 4.200648][ T1] ---[ end trace 0000000000000000 ]--- The kernel config and materials to reproduce are available at: https://download.01.org/0day-ci/archive/20240301/202403011746.b71e99d5-lkp@xxxxxxxxx -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki