All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bug 8213] Race: a lock is expected before calling BusLogic_WriteOutgoingMailbox, but it is not held in some case and it is held in other cases
       [not found] <bug-8213-11613@http.bugzilla.kernel.org/>
@ 2009-08-29  9:29 ` bugzilla-daemon
  2009-08-29 16:13   ` James Bottomley
  2009-08-29 15:53 ` bugzilla-daemon
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 5+ messages in thread
From: bugzilla-daemon @ 2009-08-29  9:29 UTC (permalink / raw)
  To: linux-scsi

http://bugzilla.kernel.org/show_bug.cgi?id=8213


Roland Kletzing <devzero@web.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |devzero@web.de




--- Comment #2 from Roland Kletzing <devzero@web.de>  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:      James.Bottomley@HansenPartnership.com
L:      linux-scsi@vger.kernel.org
T:      git
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6.git
T:      git
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6.git
T:      git
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-pending-2.6.git
S:      Maintained
F:      drivers/scsi/
F:      include/scsi/

-- 
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug 8213] Race: a lock is expected before calling BusLogic_WriteOutgoingMailbox, but it is not held in some case and it is held in other cases
       [not found] <bug-8213-11613@http.bugzilla.kernel.org/>
  2009-08-29  9:29 ` [Bug 8213] Race: a lock is expected before calling BusLogic_WriteOutgoingMailbox, but it is not held in some case and it is held in other cases bugzilla-daemon
@ 2009-08-29 15:53 ` bugzilla-daemon
  2009-08-29 16:14 ` bugzilla-daemon
  2009-08-29 16:36 ` bugzilla-daemon
  3 siblings, 0 replies; 5+ messages in thread
From: bugzilla-daemon @ 2009-08-29 15:53 UTC (permalink / raw)
  To: linux-scsi

http://bugzilla.kernel.org/show_bug.cgi?id=8213


Lin Tan <tammy000@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
     Kernel Version|2.6.20.1                    |2.6.30.5
         Regression|---                         |No




--- Comment #3 from Lin Tan <tammy000@gmail.com>  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.

-- 
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [Bug 8213] Race: a lock is expected before calling BusLogic_WriteOutgoingMailbox, but it is not held in some case and it is held in other cases
  2009-08-29  9:29 ` [Bug 8213] Race: a lock is expected before calling BusLogic_WriteOutgoingMailbox, but it is not held in some case and it is held in other cases bugzilla-daemon
@ 2009-08-29 16:13   ` James Bottomley
  0 siblings, 0 replies; 5+ messages in thread
From: James Bottomley @ 2009-08-29 16:13 UTC (permalink / raw)
  To: bugzilla-daemon; +Cc: linux-scsi

On Sat, 2009-08-29 at 09:29 +0000, bugzilla-daemon@bugzilla.kernel.org
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

> WRT MAINTAINERS file, there seems no special maintainer for buslogic driver.
> i`d bring that up on linux-scsi ML.

If I look at the original report:


> Block comment before function BusLogic_WriteOutgoingMailbox says "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.

> In some others such as:
> BusLogic_WriteOutgoingMailbox	<- BusLogic_QueueCommand <- scsi_send_eh_cmnd
> BusLogic_WriteOutgoingMailbox	<- BusLogic_QueueCommand <- scsi_dispatch_cmd
> BusLogic_WriteOutgoingMailbox	<- BusLogic_QueueCommand <- scsi_log_send <-
> scsi_send_eh_cmnd
> 
> a lock IS held.

Right, *every* actual invocation of queuecommand holds the lock, so this
bug report is invalid.

James



^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug 8213] Race: a lock is expected before calling BusLogic_WriteOutgoingMailbox, but it is not held in some case and it is held in other cases
       [not found] <bug-8213-11613@http.bugzilla.kernel.org/>
  2009-08-29  9:29 ` [Bug 8213] Race: a lock is expected before calling BusLogic_WriteOutgoingMailbox, but it is not held in some case and it is held in other cases bugzilla-daemon
  2009-08-29 15:53 ` bugzilla-daemon
@ 2009-08-29 16:14 ` bugzilla-daemon
  2009-08-29 16:36 ` bugzilla-daemon
  3 siblings, 0 replies; 5+ messages in thread
From: bugzilla-daemon @ 2009-08-29 16:14 UTC (permalink / raw)
  To: linux-scsi

http://bugzilla.kernel.org/show_bug.cgi?id=8213





--- Comment #4 from Anonymous Emailer <anonymous@kernel-bugs.osdl.org>  2009-08-29 16:14:02 ---
Reply-To: James.Bottomley@suse.de

On Sat, 2009-08-29 at 09:29 +0000, bugzilla-daemon@bugzilla.kernel.org
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

> WRT MAINTAINERS file, there seems no special maintainer for buslogic driver.
> i`d bring that up on linux-scsi ML.

If I look at the original report:


> Block comment before function BusLogic_WriteOutgoingMailbox says "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.

> In some others such as:
> BusLogic_WriteOutgoingMailbox	<- BusLogic_QueueCommand <- scsi_send_eh_cmnd
> BusLogic_WriteOutgoingMailbox	<- BusLogic_QueueCommand <- scsi_dispatch_cmd
> BusLogic_WriteOutgoingMailbox	<- BusLogic_QueueCommand <- scsi_log_send <-
> scsi_send_eh_cmnd
> 
> a lock IS held.

Right, *every* actual invocation of queuecommand holds the lock, so this
bug report is invalid.

James

-- 
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug 8213] Race: a lock is expected before calling BusLogic_WriteOutgoingMailbox, but it is not held in some case and it is held in other cases
       [not found] <bug-8213-11613@http.bugzilla.kernel.org/>
                   ` (2 preceding siblings ...)
  2009-08-29 16:14 ` bugzilla-daemon
@ 2009-08-29 16:36 ` bugzilla-daemon
  3 siblings, 0 replies; 5+ messages in thread
From: bugzilla-daemon @ 2009-08-29 16:36 UTC (permalink / raw)
  To: linux-scsi

http://bugzilla.kernel.org/show_bug.cgi?id=8213


Lin Tan <tammy000@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID




--- Comment #5 from Lin Tan <tammy000@gmail.com>  2009-08-29 16:36:49 ---
Ah, I think you are right, James.

-- 
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-08-29 16:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <bug-8213-11613@http.bugzilla.kernel.org/>
2009-08-29  9:29 ` [Bug 8213] Race: a lock is expected before calling BusLogic_WriteOutgoingMailbox, but it is not held in some case and it is held in other cases bugzilla-daemon
2009-08-29 16:13   ` James Bottomley
2009-08-29 15:53 ` bugzilla-daemon
2009-08-29 16:14 ` bugzilla-daemon
2009-08-29 16:36 ` bugzilla-daemon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.