lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Sun, 4 Jan 2009 16:14:31 +0100
From:	Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
To:	Grissiom <chaos.proton@...il.com>
Cc:	linux-kernel@...r.kernel.org,
	Larry Finger <Larry.Finger@...inger.net>
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 <bzolnier@...il.com>
Subject: [PATCH] ide: fix LOCKDEP warning

commit 295f00042aaf6b553b5f37348f89bab463d4a469 ("ide: don't execute
the next queued command from the hard-IRQ context") overlooked that
ide_do_drive_cmd() (used for REQUEST SENSE command handling) may still
invoke do_ide_request() (->request_fn) in the hard-IRQ context through
blk_start_queueing().  This resulted in a LOCKDEP warning after commit
b599bc7a1199419e122cb2e9ec6b0fa2cfbbc17b ("ide: use per-device request
queue locks (v2)").

Since calling blk_start_queuing() in ide_do_drive_cmd() doesn't make
much sense as the port is already marked as busy (so the execution of
the new command will be deferred anyway) then just remove it fixing
LOCKDEP warning and saving some CPU cycles at the same time.

Reported-by: Larry Finger <Larry.Finger@...inger.net>
Reported-by: Grissiom <chaos.proton@...il.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@...il.com>
---
 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);
.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ