Skip to contentSkip to conversation

WARNING: at drivers/base/sys.c:183 sysdev_driver_register+0x7a

DISCUSSION Ingo Molnar 3 participants 5 messages Apr 22, 2008 – May 7, 2008 Driver core

lore
Share & tools
lore
#0 lore raw

hi Len,

randconfig boot testing found this new debug warning message in the syslog:

[   78.736920] Calling initcall 0xffffffff814792c5: powernowk8_init+0x0/0x9d()
[   78.744921] powernow-k8: Found 1 AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ processors (1 cpu cores) (version 2.20.00)
[   78.752921] powernow-k8: BIOS error - no PSB or ACPI _PSS objects
[   78.756922] initcall 0xffffffff814792c5: powernowk8_init+0x0/0x9d() returned -19.
[   78.764922] initcall 0xffffffff814792c5 ran for 11 msecs: powernowk8_init+0x0/0x9d()
[   78.772923] Calling initcall 0xffffffff820ed639: acpi_cpufreq_init+0x0/0x94()
[   78.780923] sysdev: class cpu: driver (ffffffff81f96da0) has already been registered to a class, something is wrong, but will forge on!
[   78.784923] ------------[ cut here ]------------
[   78.788924] WARNING: at drivers/base/sys.c:183 sysdev_driver_register+0x7a/0x12b()
[   78.792924] Modules linked in:
[   78.796924] Pid: 1, comm: swapper Not tainted 2.6.25-sched-devel.git-x86-latest.git #4
[   78.800924] 
[   78.800924] Call Trace:
[   78.804925]  [<ffffffff80259cc2>] warn_on_slowpath+0x5d/0x70
[   78.808925]  [<ffffffff8025ad26>] ? printk+0x6c/0x6e
[   78.812925]  [<ffffffff80279ed9>] ? trace_hardirqs_off+0xd/0xf
[   78.816925]  [<ffffffff8148135a>] ? _spin_unlock_irqrestore+0x4c/0x5c
[   78.820926]  [<ffffffff8027b29f>] ? trace_hardirqs_on+0xd/0xf
[   78.824926]  [<ffffffff802ad2ea>] ? time_hardirqs_on+0x21/0x26
[   78.828926]  [<ffffffff808085f9>] sysdev_driver_register+0x7a/0x12b
[   78.832926]  [<ffffffff80f6c5f1>] cpufreq_register_driver+0xc7/0x1a3
[   78.836927]  [<ffffffff820ed6cb>] acpi_cpufreq_init+0x92/0x94
[   78.840927]  [<ffffffff820e39f3>] kernel_init+0x180/0x302
[   78.844927]  [<ffffffff81480a0e>] ? trace_hardirqs_on_thunk+0x3a/0x3f
[   78.848927]  [<ffffffff8027b267>] ? trace_hardirqs_on_caller+0x117/0x142
[   78.852928]  [<ffffffff80221768>] child_rip+0xa/0x12
[   78.856928]  [<ffffffff80220cfc>] ? restore_args+0x0/0x30
[   78.860928]  [<ffffffff820e3873>] ? kernel_init+0x0/0x302
[   78.864928]  [<ffffffff8022175e>] ? child_rip+0x0/0x12
[   78.868929] 
[   78.868929] ---[ end trace e4117b3214f66ad9 ]---
[   78.872929] initcall 0xffffffff820ed639: acpi_cpufreq_init+0x0/0x94() returned -19.
[   78.880929] initcall 0xffffffff820ed639 ran for 87 msecs: acpi_cpufreq_init+0x0/0x94()
[   78.888930] Calling initcall 0xffffffff820ed6cd: centrino_init+0x0/0x44()
[   78.896930] initcall 0xffffffff820ed6cd: centrino_init+0x0/0x44() returned -19.

full log and config at:

http://redhat.com/~mingo/misc/log-Tue_Apr_22_09_33_16_CEST_2008.bad
http://redhat.com/~mingo/misc/config-Tue_Apr_22_09_33_16_CEST_2008.bad

Ingo

#1 lore raw
Quoted 4 lines · Ingo Molnar

hi Len,

randconfig boot testing found this new debug warning message in the syslog:

Ditto with Q6600 and v2.6.25-3410-g8075014.

[   28.360968] sysdev: class cpu: driver (ffffffff80542a70) has already been registered to a class, something is wrong, but will forge on!
[   28.379718] ------------[ cut here ]------------
[   28.387748] WARNING: at drivers/base/sys.c:183 sysdev_driver_register+0x75/0x12c()
[   28.398816] Modules linked in: acpi_cpufreq(+) snd_pcm_oss snd_mixer_oss snd_seq microcode snd_seq_device nls_iso8859_1 nls_cp437 vfat fat fuse loop dm_mod tda1004x saa7134_dvb videobuf_dvb dvb_core tuner tea5767 tda8290 tda827x tuner_xc2028 tda9887 tuner_simple mt20xx tea5761 snd_hda_intel saa7134 firewire_ohci snd_pcm firewire_core compat_ioctl32 crc_itu_t videodev snd_timer v4l1_compat snd_page_alloc snd_hwdep v4l2_common snd videobuf_dma_sg ohci1394 videobuf_core usbhid usb_storage e1000e rtc_cmos ieee1394 rtc_core ir_kbd_i2c hid iTCO_wdt sr_mod soundcore ir_common rtc_lib tveeprom button i2c_i801 serio_raw cdrom intel_agp ff_memless sg i2c_core iTCO_vendor_support ehci_hcd uhci_hcd sd_mod usbcore edd ext3 mbcache jbd fan ahci libata scsi_mod dock thermal processor
[   28.514728] Pid: 2910, comm: modprobe Not tainted 2.6.26-smp #4
[   28.525112] 
[   28.525113] Call Trace:
[   28.537784]  [<ffffffff802327b3>] warn_on_slowpath+0x58/0x6b
[   28.547864]  [<ffffffff80233595>] ? printk+0x67/0x69
[   28.557169]  [<ffffffffa000387a>] ? :processor:acpi_processor_preregister_performance+0x40f/0x421
[   28.570438]  [<ffffffff803701ff>] sysdev_driver_register+0x75/0x12c
[   28.581048]  [<ffffffff80392ab0>] cpufreq_register_driver+0x95/0x12c
[   28.591770]  [<ffffffffa00ea03f>] :acpi_cpufreq:acpi_cpufreq_init+0x3f/0x41
[   28.603226]  [<ffffffff802543a0>] sys_init_module+0x19db/0x1b08
[   28.614176]  [<ffffffff8028dec3>] ? vfs_read+0xab/0x154
[   28.624319]  [<ffffffff8020c01b>] system_call_after_swapgs+0x7b/0x80
[   28.624326] 
[   28.624328] ---[ end trace a40285f696d317dc ]---
#2 lore raw
Quoted 8 lines · Mike Galbraith
Quoted 4 lines · Ingo Molnar

hi Len,

randconfig boot testing found this new debug warning message in the syslog:

Ditto with Q6600 and v2.6.25-3410-g8075014.

Does it still happen with the current -git?

Quoted 27 lines
[   28.360968] sysdev: class cpu: driver (ffffffff80542a70) has already been registered to a class, something is wrong, but will forge on!
[   28.379718] ------------[ cut here ]------------
[   28.387748] WARNING: at drivers/base/sys.c:183 sysdev_driver_register+0x75/0x12c()
[   28.398816] Modules linked in: acpi_cpufreq(+) snd_pcm_oss snd_mixer_oss snd_seq microcode snd_seq_device nls_iso8859_1 nls_cp437 vfat fat fuse loop dm_mod tda1004x saa7134_dvb videobuf_dvb dvb_core tuner tea5767 tda8290 tda827x tuner_xc2028 tda9887 tuner_simple mt20xx tea5761 snd_hda_intel saa7134 firewire_ohci snd_pcm firewire_core compat_ioctl32 crc_itu_t videodev snd_timer v4l1_compat snd_page_alloc snd_hwdep v4l2_common snd videobuf_dma_sg ohci1394 videobuf_core usbhid usb_storage e1000e rtc_cmos ieee1394 rtc_core ir_kbd_i2c hid iTCO_wdt sr_mod soundcore ir_common rtc_lib tveeprom button i2c_i801 serio_raw cdrom intel_agp ff_memless sg i2c_core iTCO_vendor_support ehci_hcd uhci_hcd sd_mod usbcore edd ext3 mbcache jbd fan ahci libata scsi_mod dock thermal processor
[   28.514728] Pid: 2910, comm: modprobe Not tainted 2.6.26-smp #4
[   28.525112] 
[   28.525113] Call Trace:
[   28.537784]  [<ffffffff802327b3>] warn_on_slowpath+0x58/0x6b
[   28.547864]  [<ffffffff80233595>] ? printk+0x67/0x69
[   28.557169]  [<ffffffffa000387a>] ? :processor:acpi_processor_preregister_performance+0x40f/0x421
[   28.570438]  [<ffffffff803701ff>] sysdev_driver_register+0x75/0x12c
[   28.581048]  [<ffffffff80392ab0>] cpufreq_register_driver+0x95/0x12c
[   28.591770]  [<ffffffffa00ea03f>] :acpi_cpufreq:acpi_cpufreq_init+0x3f/0x41
[   28.603226]  [<ffffffff802543a0>] sys_init_module+0x19db/0x1b08
[   28.614176]  [<ffffffff8028dec3>] ? vfs_read+0xab/0x154
[   28.624319]  [<ffffffff8020c01b>] system_call_after_swapgs+0x7b/0x80
[   28.624326] 
[   28.624328] ---[ end trace a40285f696d317dc ]---

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Signature · 1 line
"Premature optimization is the root of all evil." - Donald Knuth
#3 lore raw
Quoted 11 lines · Rafael J. Wysocki
Quoted 8 lines · Mike Galbraith
Quoted 4 lines · Ingo Molnar

hi Len,

randconfig boot testing found this new debug warning message in the syslog:

Ditto with Q6600 and v2.6.25-3410-g8075014.

Does it still happen with the current -git?

No, it was fixed by:

commit db176c6ed8974fae94328ad5ac9e70b094ff22fd

Author: OGAWA Hirofumi <[email protected]>
Date:   Wed May 7 04:02:53 2008 +0900

Fix bogus warning in sysdev_driver_register()

if ((drv->entry.next != drv->entry.prev) ||
(drv->entry.next != NULL)) {

warns list_empty(&drv->entry).

Cc Greg KH <[email protected]>
Cc Len Brown <[email protected]>
[ Version 2 totally redone based on suggestions from Linus & Greg ]
drivers/base/sys.c +1 -2
index 4fbb56b..358bb0b 100644
@@ -175,8 +175,7 @@ int sysdev_driver_register(struct sysdev_class *cls, struct sysdev_driver *drv)
 	}
 
 	/* Check whether this driver has already been added to a class. */
-	if ((drv->entry.next != drv->entry.prev) ||
-	    (drv->entry.next != NULL)) {
+	if (drv->entry.next && !list_empty(&drv->entry)) {
 		printk(KERN_WARNING "sysdev: class %s: driver (%p) has already"
 			" been registered to a class, something is wrong, but "
 			"will forge on!\n", cls->name, drv);
#4 lore raw
Quoted 7 lines · Mike Galbraith
Quoted 5 lines · Rafael J. Wysocki
Quoted 4 lines · Mike Galbraith
Quoted 2 lines · Ingo Molnar

hi Len,

Quoted 8 lines
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines

randconfig boot testing found this new debug warning message in the syslog:

Ditto with Q6600 and v2.6.25-3410-g8075014.

Does it still happen with the current -git?

No, it was fixed by:

OK, thanks.

Quoted 37 lines

commit db176c6ed8974fae94328ad5ac9e70b094ff22fd

Author: OGAWA Hirofumi <[email protected]>
Date:   Wed May 7 04:02:53 2008 +0900

Fix bogus warning in sysdev_driver_register()

if ((drv->entry.next != drv->entry.prev) ||
(drv->entry.next != NULL)) {

warns list_empty(&drv->entry).

Cc Greg KH <[email protected]>
Cc Len Brown <[email protected]>
[ Version 2 totally redone based on suggestions from Linus & Greg ]
drivers/base/sys.c +1 -2
index 4fbb56b..358bb0b 100644
@@ -175,8 +175,7 @@ int sysdev_driver_register(struct sysdev_class *cls, struct sysdev_driver *drv)
 	}
 
 	/* Check whether this driver has already been added to a class. */
-	if ((drv->entry.next != drv->entry.prev) ||
-	    (drv->entry.next != NULL)) {
+	if (drv->entry.next && !list_empty(&drv->entry)) {
 		printk(KERN_WARNING "sysdev: class %s: driver (%p) has already"
 			" been registered to a class, something is wrong, but "
 			"will forge on!\n", cls->name, drv);
Signature · 1 line
"Premature optimization is the root of all evil." - Donald Knuth