Re: [PATCH] drivers/base/devres.c: refactor using guards

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hello,

kernel test robot noticed "WARNING:at_drivers/pinctrl/core.c:#devm_pinctrl_put" on:

commit: ce2701911ab8b371b9a93b6f9482f0577729d8aa ("[PATCH] drivers/base/devres.c: refactor using guards")
url: https://github.com/intel-lab-lkp/linux/commits/Andrea-Calabrese/drivers-base-devres-c-refactor-using-guards/20240606-194831
base: https://git.kernel.org/cgit/linux/kernel/git/gregkh/driver-core.git 1968845d358e108cfbfba45538d64b3cbdf04ac2
patch link: https://lore.kernel.org/all/20240606091744.1115656-1-andrea.calabrese@xxxxxxxxxxxxxxxxxxxx/
patch subject: [PATCH] drivers/base/devres.c: refactor using guards

in testcase: boot

compiler: gcc-13
test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G

(please refer to attached dmesg/kmsg for entire log/backtrace)


+-----------------------------------------------------+------------+------------+
|                                                     | 1968845d35 | ce2701911a |
+-----------------------------------------------------+------------+------------+
| WARNING:at_drivers/pinctrl/core.c:#devm_pinctrl_put | 0          | 8          |
| RIP:devm_pinctrl_put                                | 0          | 8          |
| WARNING:at_drivers/base/devres.c:#devm_kfree        | 0          | 8          |
| RIP:devm_kfree                                      | 0          | 8          |
+-----------------------------------------------------+------------+------------+


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 <oliver.sang@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-lkp/202406111401.915dd40c-oliver.sang@xxxxxxxxx


[    6.612845][    T1] ------------[ cut here ]------------
[ 6.613979][ T1] WARNING: CPU: 1 PID: 1 at drivers/pinctrl/core.c:1421 devm_pinctrl_put (drivers/pinctrl/core.c:1421 (discriminator 1)) 
[    6.615797][    T1] Modules linked in:
[    6.616639][    T1] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 6.10.0-rc2-00003-gce2701911ab8 #1
[    6.618361][    T1] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
[ 6.620369][ T1] RIP: 0010:devm_pinctrl_put (drivers/pinctrl/core.c:1421 (discriminator 1)) 
[ 6.621474][ T1] Code: 1e fa 0f 1f 44 00 00 48 89 f9 48 8b 7f 10 48 c7 c2 10 31 a7 af 48 c7 c6 d0 52 a7 af e8 dd fc 1d 00 85 c0 75 05 c3 cc cc cc cc <0f> 0b c3 cc cc cc cc 66 66 2e 0f 1f 84 00 00 00 00 00 66 66 2e 0f
All code
========
   0:	1e                   	(bad)  
   1:	fa                   	cli    
   2:	0f 1f 44 00 00       	nopl   0x0(%rax,%rax,1)
   7:	48 89 f9             	mov    %rdi,%rcx
   a:	48 8b 7f 10          	mov    0x10(%rdi),%rdi
   e:	48 c7 c2 10 31 a7 af 	mov    $0xffffffffafa73110,%rdx
  15:	48 c7 c6 d0 52 a7 af 	mov    $0xffffffffafa752d0,%rsi
  1c:	e8 dd fc 1d 00       	callq  0x1dfcfe
  21:	85 c0                	test   %eax,%eax
  23:	75 05                	jne    0x2a
  25:	c3                   	retq   
  26:	cc                   	int3   
  27:	cc                   	int3   
  28:	cc                   	int3   
  29:	cc                   	int3   
  2a:*	0f 0b                	ud2    		<-- trapping instruction
  2c:	c3                   	retq   
  2d:	cc                   	int3   
  2e:	cc                   	int3   
  2f:	cc                   	int3   
  30:	cc                   	int3   
  31:	66 66 2e 0f 1f 84 00 	data16 nopw %cs:0x0(%rax,%rax,1)
  38:	00 00 00 00 
  3c:	66                   	data16
  3d:	66                   	data16
  3e:	2e                   	cs
  3f:	0f                   	.byte 0xf

Code starting with the faulting instruction
===========================================
   0:	0f 0b                	ud2    
   2:	c3                   	retq   
   3:	cc                   	int3   
   4:	cc                   	int3   
   5:	cc                   	int3   
   6:	cc                   	int3   
   7:	66 66 2e 0f 1f 84 00 	data16 nopw %cs:0x0(%rax,%rax,1)
   e:	00 00 00 00 
  12:	66                   	data16
  13:	66                   	data16
  14:	2e                   	cs
  15:	0f                   	.byte 0xf
[    6.625180][    T1] RSP: 0000:ffffa68c80013cc8 EFLAGS: 00010282
[    6.626437][    T1] RAX: 00000000fffffffe RBX: ffff904e3c9df268 RCX: ffff904dc2ff1de0
[    6.628077][    T1] RDX: 0000000000000001 RSI: ffff904dc2cc0da8 RDI: ffff904e3c9df4fc
[    6.629687][    T1] RBP: 0000000000000000 R08: ffffffffb0b25f14 R09: 0000000000000008
[    6.631332][    T1] R10: ffffa68c80013c70 R11: fefefefefefefeff R12: ffff904dc2ff1448
[    6.633008][    T1] R13: ffffffffb12dfea8 R14: ffff904dc316c2a8 R15: 0000000000000000
[    6.634594][    T1] FS:  0000000000000000(0000) GS:ffff9050efd00000(0000) knlGS:0000000000000000
[    6.640486][    T1] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    6.641757][    T1] CR2: 0000000000000000 CR3: 000000017b21c000 CR4: 00000000000406f0
[    6.643386][    T1] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[    6.645004][    T1] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[    6.646657][    T1] Call Trace:
[    6.647410][    T1]  <TASK>
[ 6.648104][ T1] ? __warn (kernel/panic.c:693) 
[ 6.648930][ T1] ? devm_pinctrl_put (drivers/pinctrl/core.c:1421 (discriminator 1)) 
[ 6.649920][ T1] ? report_bug (lib/bug.c:180 lib/bug.c:219) 
[ 6.650828][ T1] ? handle_bug (arch/x86/kernel/traps.c:239) 
[ 6.651843][ T1] ? exc_invalid_op (arch/x86/kernel/traps.c:260 (discriminator 1)) 
[ 6.652811][ T1] ? asm_exc_invalid_op (arch/x86/include/asm/idtentry.h:621) 
[ 6.653845][ T1] ? devm_pinctrl_put (drivers/pinctrl/core.c:1421 (discriminator 1)) 
[ 6.654844][ T1] ? devm_pinctrl_put (drivers/pinctrl/core.c:1421 (discriminator 2)) 
[ 6.655807][ T1] pinctrl_bind_pins (drivers/base/pinctrl.c:93) 
[ 6.656804][ T1] really_probe (drivers/base/dd.c:634) 
[ 6.657723][ T1] ? __pfx___driver_attach (drivers/base/dd.c:1155) 
[ 6.658761][ T1] __driver_probe_device (drivers/base/dd.c:798) 
[ 6.659886][ T1] driver_probe_device (drivers/base/dd.c:828) 
[ 6.660925][ T1] __driver_attach (drivers/base/dd.c:1215) 
[ 6.661869][ T1] bus_for_each_dev (drivers/base/bus.c:368) 
[ 6.662840][ T1] bus_add_driver (drivers/base/bus.c:673) 
[ 6.663820][ T1] driver_register (drivers/base/driver.c:246) 
[ 6.664784][ T1] ? __pfx_acpi_button_driver_init (drivers/acpi/button.c:743) 
[ 6.665950][ T1] do_one_initcall (init/main.c:1267) 
[ 6.666882][ T1] do_initcalls (init/main.c:1328 (discriminator 1) init/main.c:1345 (discriminator 1)) 
[ 6.667815][ T1] kernel_init_freeable (init/main.c:1582) 
[ 6.668909][ T1] ? __pfx_kernel_init (init/main.c:1459) 
[ 6.669973][ T1] kernel_init (init/main.c:1469) 
[ 6.670856][ T1] ret_from_fork (arch/x86/kernel/process.c:153) 
[ 6.671756][ T1] ? __pfx_kernel_init (init/main.c:1459) 
[ 6.672770][ T1] ret_from_fork_asm (arch/x86/entry/entry_64.S:257) 
[    6.673765][    T1]  </TASK>
[    6.674467][    T1] ---[ end trace 0000000000000000 ]---


The kernel config and materials to reproduce are available at:
https://download.01.org/0day-ci/archive/20240611/202406111401.915dd40c-oliver.sang@xxxxxxxxx



-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux