2009-01-03 03:24:34

by Larry Finger

[permalink] [raw]
Subject: Kernel warning from latest 2.6.28-gitX

Kernel v2.6.28-5356-g6680598 generates the following warning at bootup:

WARNING: at kernel/lockdep.c:2197 trace_hardirqs_on_caller+0xb8/0x138()
Hardware name: HP Pavilion dv2700 Notebook PC
Modules linked in: ide_cd_mod(+) k8temp joydev soundcore cfg80211
serio_raw hwmon wmi button battery ac forcedeth snd_page_alloc cdrom
sg sd_mod ohci_hcd uhci_hcd ehci_hcd usbcore edd ext3 mbcache jbd fan
amd74xx ide_core ahci libata scsi_mod thermal processor
Pid: 1243, comm: udevd Not tainted 2.6.28-Linus-05356-g6680598 #28
Call Trace:
<IRQ> [<ffffffff8023dde7>] warn_slowpath+0xb6/0xf2
[<ffffffff8045b152>] ? _spin_unlock_irqrestore+0x3d/0x4c
[<ffffffff80231af5>] ? enqueue_entity+0x118/0x120
[<ffffffff8025e6fa>] ? trace_hardirqs_off+0xd/0xf
[<ffffffffa00a13bc>] ? ide_do_drive_cmd+0x35/0x69 [ide_core]
[<ffffffff8045b110>] ? _spin_unlock_irq+0x30/0x35
[<ffffffff8025fe38>] trace_hardirqs_on_caller+0xb8/0x138
[<ffffffff8025fec5>] trace_hardirqs_on+0xd/0xf
[<ffffffff8045b110>] _spin_unlock_irq+0x30/0x35
[<ffffffffa00a19a8>] do_ide_request+0x58/0x5ac [ide_core]
[<ffffffff80322273>] blk_start_queueing+0x22/0x2b
[<ffffffffa00a13d9>] ide_do_drive_cmd+0x52/0x69 [ide_core]
[<ffffffffa022287c>] cdrom_queue_request_sense+0x93/0x9f [ide_cd_mod]
[<ffffffffa0222b86>] cdrom_decode_status+0x2fe/0x320 [ide_cd_mod]
[<ffffffffa02231d8>] cdrom_newpc_intr+0x98/0x5a8 [ide_cd_mod]
[<ffffffffa0223140>] ? cdrom_newpc_intr+0x0/0x5a8 [ide_cd_mod]
[<ffffffffa00a15a2>] ide_intr+0x16b/0x1e4 [ide_core]
[<ffffffff8027967d>] handle_IRQ_event+0x25/0x5a
[<ffffffff8027a9fb>] handle_edge_irq+0xe7/0x12d
[<ffffffff8045bb9d>] __irqentry_text_start+0x75/0xe9
[<ffffffff8020cd13>] ret_from_intr+0x0/0xf
<EOI> <4>---[ end trace ac9dde4da52e7265 ]---


2009-01-04 00:55:58

by Grissiom

[permalink] [raw]
Subject: Re: Kernel warning from latest 2.6.28-gitX

Yes, maybe I have the same problem, here is a snippet of dmesg:

[ 0.728735] Probing IDE interface ide0...
[ 1.430414] hda: HL-DT-ST DVD+/-RW GSA-T11N, ATAPI CD/DVD-ROM drive
[ 1.760120] hda: host max PIO4 wanted PIO255(auto-tune) selected
PIO4
[ 1.760946] hda: UDMA/33 mode selected
[ 1.773525] ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
[ 1.789149] ide-cd driver 5.00
[ 1.802700] ide-cd: hda: ATAPI 24X DVD-ROM DVD-R CD-R/RW drive,
2048kB Cache
[ 1.814860] Uniform CD-ROM driver Revision: 3.20
[ 1.828677] ------------[ cut here ]------------
[ 1.831992] WARNING: at kernel/lockdep.c:2197
trace_hardirqs_on_caller+0x134/0x1a0()
[ 1.831992] Hardware name: Inspiron 1501
[ 1.831992] Modules linked in:
[ 1.831992] Pid: 0, comm: swapper Not tainted
2.6.28-g14-rfkill-nophy-ledon-05692-g7d3b56b #57
[ 1.831992] Call Trace:
[ 1.831992] [<c012a049>] warn_slowpath+0x99/0xc0
[ 1.831992] [<c0140030>] posix_cpu_timer_set+0x3e0/0x410
[ 1.831992] [<c0104f5a>] dump_trace+0x6a/0xb0
[ 1.831992] [<c014e83a>] validate_chain+0x41a/0x11a0
[ 1.831992] [<c014f853>] __lock_acquire+0x293/0xa20
[ 1.831992] [<c014f853>] __lock_acquire+0x293/0xa20
[ 1.831992] [<c014e83a>] validate_chain+0x41a/0x11a0
[ 1.831992] [<c014e83a>] validate_chain+0x41a/0x11a0
[ 1.831992] [<c04d7de0>] _spin_unlock_irq+0x20/0x40
[ 1.831992] [<c014dc84>] trace_hardirqs_on_caller+0x134/0x1a0
[ 1.831992] [<c04d7de0>] _spin_unlock_irq+0x20/0x40
[ 1.831992] [<c0322280>] do_ide_request+0x40/0x570
[ 1.831992] [<c014f853>] __lock_acquire+0x293/0xa20
[ 1.831992] [<c04d7a4b>] _spin_lock_irqsave+0x4b/0x60
[ 1.831992] [<c0254435>] blk_start_queueing+0x15/0x30
[ 1.831992] [<c03219ea>] ide_do_drive_cmd+0x4a/0x70
[ 1.831992] [<c032d4c6>] cdrom_decode_status+0x116/0x380
[ 1.831992] [<c032dd40>] cdrom_newpc_intr+0x0/0x680
[ 1.831992] [<c032dd83>] cdrom_newpc_intr+0x43/0x680
[ 1.831992] [<c032dd40>] cdrom_newpc_intr+0x0/0x680
[ 1.831992] [<c0321b94>] ide_intr+0x134/0x1b0
[ 1.831992] [<c01696b0>] handle_IRQ_event+0x20/0x50
[ 1.831992] [<c016b365>] handle_edge_irq+0xb5/0x120
[ 1.831992] [<c0104dc8>] do_IRQ+0x48/0x90
[ 1.831992] [<c02688a4>] trace_hardirqs_off_thunk+0xc/0x18
[ 1.831992] [<c01039ac>] common_interrupt+0x2c/0x34
[ 1.831992] [<c01091ed>] default_idle+0x3d/0x60
[ 1.831992] [<c01093f3>] c1e_idle+0x93/0x110
[ 1.831992] [<c0101c8b>] cpu_idle+0x6b/0xd0
[ 1.831992] ---[ end trace 5a56406b278561cb ]---
[ 2.204724] Driver 'sd' needs updating - please use bus_type methods
--
Cheers,
Grissiom

Subject: Re: Kernel warning from latest 2.6.28-gitX

On Sunday 04 January 2009, Grissiom wrote:> Yes, maybe I have the same problem, here is a snippet of dmesg:> > [ 0.728735] Probing IDE interface ide0...> [ 1.430414] hda: HL-DT-ST DVD+/-RW GSA-T11N, ATAPI CD/DVD-ROM drive> [ 1.760120] hda: host max PIO4 wanted PIO255(auto-tune) selected> PIO4> [ 1.760946] hda: UDMA/33 mode selected> [ 1.773525] ide0 at 0x1f0-0x1f7,0x3f6 on irq 14> [ 1.789149] ide-cd driver 5.00> [ 1.802700] ide-cd: hda: ATAPI 24X DVD-ROM DVD-R CD-R/RW drive,> 2048kB Cache> [ 1.814860] Uniform CD-ROM driver Revision: 3.20> [ 1.828677] ------------[ cut here ]------------> [ 1.831992] WARNING: at kernel/lockdep.c:2197> trace_hardirqs_on_caller+0x134/0x1a0()> [ 1.831992] Hardware name: Inspiron 1501> [ 1.831992] Modules linked in:> [ 1.831992] Pid: 0, comm: swapper Not tainted> 2.6.28-g14-rfkill-nophy-ledon-05692-g7d3b56b #57> [ 1.831992] Call Trace:> [ 1.831992] [<c012a049>] warn_slowpath+0x99/0xc0> [ 1.831992] [<c0140030>] posix_cpu_timer_set+0x3e0/0x410> [ 1.831992] [<c0104f5a>] dump_trace+0x6a/0xb0> [ 1.831992] [<c014e83a>] validate_chain+0x41a/0x11a0> [ 1.831992] [<c014f853>] __lock_acquire+0x293/0xa20> [ 1.831992] [<c014f853>] __lock_acquire+0x293/0xa20> [ 1.831992] [<c014e83a>] validate_chain+0x41a/0x11a0> [ 1.831992] [<c014e83a>] validate_chain+0x41a/0x11a0> [ 1.831992] [<c04d7de0>] _spin_unlock_irq+0x20/0x40> [ 1.831992] [<c014dc84>] trace_hardirqs_on_caller+0x134/0x1a0> [ 1.831992] [<c04d7de0>] _spin_unlock_irq+0x20/0x40> [ 1.831992] [<c0322280>] do_ide_request+0x40/0x570> [ 1.831992] [<c014f853>] __lock_acquire+0x293/0xa20> [ 1.831992] [<c04d7a4b>] _spin_lock_irqsave+0x4b/0x60> [ 1.831992] [<c0254435>] blk_start_queueing+0x15/0x30> [ 1.831992] [<c03219ea>] ide_do_drive_cmd+0x4a/0x70> [ 1.831992] [<c032d4c6>] cdrom_decode_status+0x116/0x380> [ 1.831992] [<c032dd40>] cdrom_newpc_intr+0x0/0x680> [ 1.831992] [<c032dd83>] cdrom_newpc_intr+0x43/0x680> [ 1.831992] [<c032dd40>] cdrom_newpc_intr+0x0/0x680> [ 1.831992] [<c0321b94>] ide_intr+0x134/0x1b0> [ 1.831992] [<c01696b0>] handle_IRQ_event+0x20/0x50> [ 1.831992] [<c016b365>] handle_edge_irq+0xb5/0x120> [ 1.831992] [<c0104dc8>] do_IRQ+0x48/0x90> [ 1.831992] [<c02688a4>] trace_hardirqs_off_thunk+0xc/0x18> [ 1.831992] [<c01039ac>] common_interrupt+0x2c/0x34> [ 1.831992] [<c01091ed>] default_idle+0x3d/0x60> [ 1.831992] [<c01093f3>] c1e_idle+0x93/0x110> [ 1.831992] [<c0101c8b>] cpu_idle+0x6b/0xd0> [ 1.831992] ---[ end trace 5a56406b278561cb ]---> [ 2.204724] Driver 'sd' needs updating - please use bus_type methods
Thanks for catching it, please try the patch below:
From: Bartlomiej Zolnierkiewicz <[email protected]>Subject: [PATCH] ide: fix LOCKDEP warning
commit 295f00042aaf6b553b5f37348f89bab463d4a469 ("ide: don't executethe next queued command from the hard-IRQ context") overlooked thatide_do_drive_cmd() (used for REQUEST SENSE command handling) may stillinvoke do_ide_request() (->request_fn) in the hard-IRQ context throughblk_start_queueing(). This resulted in a LOCKDEP warning after commitb599bc7a1199419e122cb2e9ec6b0fa2cfbbc17b ("ide: use per-device requestqueue locks (v2)").
Since calling blk_start_queuing() in ide_do_drive_cmd() doesn't makemuch sense as the port is already marked as busy (so the execution ofthe new command will be deferred anyway) then just remove it fixingLOCKDEP warning and saving some CPU cycles at the same time.
Reported-by: Larry Finger <[email protected]>Reported-by: Grissiom <[email protected]>Signed-off-by: Bartlomiej Zolnierkiewicz <[email protected]>--- drivers/ide/ide-io.c | 1 - 1 file changed, 1 deletion(-)
Index: b/drivers/ide/ide-io.c===================================================================--- a/drivers/ide/ide-io.c+++ b/drivers/ide/ide-io.c@@ -1197,7 +1197,6 @@ void ide_do_drive_cmd(ide_drive_t *drive spin_lock_irqsave(q->queue_lock, flags); __elv_add_request(q, rq, ELEVATOR_INSERT_FRONT, 0);- blk_start_queueing(q); spin_unlock_irqrestore(q->queue_lock, flags); } EXPORT_SYMBOL(ide_do_drive_cmd);????{.n?+???????+%?????ݶ??w??{.n?+????{??G?????{ay?ʇڙ?,j??f???h?????????z_??(?階?ݢj"???m??????G????????????&???~???iO???z??v?^?m???? ????????I?

2009-01-05 16:51:23

by Larry Finger

[permalink] [raw]
Subject: Re: Kernel warning from latest 2.6.28-gitX

The patch works here.

Larry