Race: a lock is expected before calling BusLogic_WriteOutgoingMailbox, but it is not held in some case and it is held in other cases
A message that is not in the archive (sent off-list or not yet received): [email protected]/
http://bugzilla.kernel.org/show_bug.cgi?id=8213
Roland Kletzing <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]
--- Comment #2 from Roland Kletzing <[email protected]> 2009-08-29 09:29:56 --- Hello Lin,
i`m curious how this report sits here unnoticed for so long. does that still apply?
WRT MAINTAINERS file, there seems no special maintainer for buslogic driver. i`d bring that up on linux-scsi ML.
SCSI SUBSYSTEM
P: James E.J. Bottomley M: [email protected] L: [email protected] T: git
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6.git
T: gitgit://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6.git
T: gitgit://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-pending-2.6.git
S: Maintained F: drivers/scsi/ F: include/scsi/
Signature · 3 lines
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug.
Quoted 2 lines · On Sat, 2009-08-29 at 09:29 +0000, [email protected] wrote:
i`m curious how this report sits here unnoticed for so long. does that still apply?
It predates the time we placed SCSI bugs directly on the mailing list and buslogic has no maintainer, so no-one noticed
Quoted 2 lines
WRT
MAINTAINERSfile, there seems no special maintainer for buslogic driver. i`d bring that up on linux-scsi ML.
If I look at the original report:
Quoted 9 lines
Block comment before function
BusLogic_WriteOutgoingMailboxsays "The Host Adapter's Lock should already have been acquired by the caller."But in the following call chain, NO lock is acquired:
BusLogic_WriteOutgoingMailbox<-BusLogic_QueueCommand
<-scsi_log_send
<-scsi_dispatch_cmd
<-scsi_request_fn
This analysis is incorrect. scsi_log_send() doesn't call queuecommand; all it does is print out the queuecommand value as a function pointer, so no lock is needed.
Quoted 7 lines
In some others such as:
BusLogic_WriteOutgoingMailbox<-BusLogic_QueueCommand<-scsi_send_eh_cmndBusLogic_WriteOutgoingMailbox<-BusLogic_QueueCommand<-scsi_dispatch_cmdBusLogic_WriteOutgoingMailbox<-BusLogic_QueueCommand<-scsi_log_send<-scsi_send_eh_cmnda lock IS held.
Right, *every* actual invocation of queuecommand holds the lock, so this bug report is invalid.
James
http://bugzilla.kernel.org/show_bug.cgi?id=8213
Lin Tan <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Kernel Version|2.6.20.1 |2.6.30.5
Regression|--- |No--- Comment #3 from Lin Tan <[email protected]> 2009-08-29 15:53:57 --- Thanks, Roland.
I checked the latest version (2.6.30.5) on the Linux cross reference, and the problem still applies.
Actually, I found that the host_lock is explicitly released before calling scsi_dispatch_cmd(). See below.
1474 static void scsi_request_fn(struct request_queue *q) 1475 {
...
1563 spin_unlock_irq(shost->host_lock);
1564
1565 /*
1566 * Finally, initialize any error handling parameters, and
set up
1567 * the timers for timeouts.
1568 */
1569 scsi_init_cmd_errh(cmd);
1570
1571 /*
1572 * Dispatch the command to the low-level driver.
1573 */
1574 rtn = scsi_dispatch_cmd(cmd);
1575
...
BTW, one clarification, BusLogic_WriteOutgoingMailbox was called twice in BusLogic_QueueCommand. The first one is what I meant in the original report. It is NOT called with the host lock held. The second invocation is fine.
Signature · 3 lines
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug.
http://bugzilla.kernel.org/show_bug.cgi?id=8213
--- Comment #4 from Anonymous Emailer <[email protected]> 2009-08-29 16:14:02 ---
Reply-To: [email protected]
Quoted 2 lines · On Sat, 2009-08-29 at 09:29 +0000, [email protected] wrote:
i`m curious how this report sits here unnoticed for so long. does that still apply?
It predates the time we placed SCSI bugs directly on the mailing list and buslogic has no maintainer, so no-one noticed
Quoted 2 lines
WRT
MAINTAINERSfile, there seems no special maintainer for buslogic driver. i`d bring that up on linux-scsi ML.
If I look at the original report:
Quoted 9 lines
Block comment before function
BusLogic_WriteOutgoingMailboxsays "The Host Adapter's Lock should already have been acquired by the caller."But in the following call chain, NO lock is acquired:
BusLogic_WriteOutgoingMailbox<-BusLogic_QueueCommand
<-scsi_log_send
<-scsi_dispatch_cmd
<-scsi_request_fn
This analysis is incorrect. scsi_log_send() doesn't call queuecommand; all it does is print out the queuecommand value as a function pointer, so no lock is needed.
Quoted 7 lines
In some others such as:
BusLogic_WriteOutgoingMailbox<-BusLogic_QueueCommand<-scsi_send_eh_cmndBusLogic_WriteOutgoingMailbox<-BusLogic_QueueCommand<-scsi_dispatch_cmdBusLogic_WriteOutgoingMailbox<-BusLogic_QueueCommand<-scsi_log_send<-scsi_send_eh_cmnda lock IS held.
Right, *every* actual invocation of queuecommand holds the lock, so this bug report is invalid.
James
Signature · 3 lines
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug.
http://bugzilla.kernel.org/show_bug.cgi?id=8213
Lin Tan <[email protected]> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID--- Comment #5 from Lin Tan <[email protected]> 2009-08-29 16:36:49 --- Ah, I think you are right, James.
Signature · 3 lines
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug.