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

Previous thread: [BUG] NULL pointer dereference in uart_write_room(). by Tetsuo Handa on Tuesday, April 22, 2008 - 12:49 am. (1 message)

Next thread: [PATCH 0/11] Generic smp_call_function() and friends by Jens Axboe on Tuesday, April 22, 2008 - 12:57 am. (67 messages)
From: Ingo Molnar
Date: Tuesday, April 22, 2008 - 12:53 am

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]  ...
From: Mike Galbraith
Date: Tuesday, April 22, 2008 - 2:04 am

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 ]---


--

From: Rafael J. Wysocki
Date: Tuesday, May 6, 2008 - 3:39 pm

-- 
"Premature optimization is the root of all evil." - Donald Knuth
--

From: Mike Galbraith
Date: Tuesday, May 6, 2008 - 11:16 pm

No, it was fixed by:

commit db176c6ed8974fae94328ad5ac9e70b094ff22fd
Author: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
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).
    
    Signed-off-by: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
    Cc: Greg KH <gregkh@suse.de>
    Cc: Len Brown <lenb@kernel.org>
    [ Version 2 totally redone based on suggestions from Linus & Greg ]
    Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

diff --git a/drivers/base/sys.c b/drivers/base/sys.c
index 4fbb56b..358bb0b 100644
--- a/drivers/base/sys.c
+++ b/drivers/base/sys.c
@@ -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);




--

From: Rafael J. Wysocki
Date: Wednesday, May 7, 2008 - 11:56 am

-- 
"Premature optimization is the root of all evil." - Donald Knuth
--

Previous thread: [BUG] NULL pointer dereference in uart_write_room(). by Tetsuo Handa on Tuesday, April 22, 2008 - 12:49 am. (1 message)

Next thread: [PATCH 0/11] Generic smp_call_function() and friends by Jens Axboe on Tuesday, April 22, 2008 - 12:57 am. (67 messages)