Re: [PATCH 1/3] SCSI: Make cmd_serial_number an atomic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, 2011-04-03 at 09:33 -0400, Christoph Hellwig wrote:
> On Sun, Apr 03, 2011 at 07:15:43AM -0600, Matthew Wilcox wrote:
> > Hm, yeah, it looks like it's only used for checking whether the command
> > we're aborting is the same command we're using to do the aborts.  In
> > which case, can't we simply do this?  Eric?
> 
> A similar question also applies for the old fusion driver.  There it
> even compares the serial number with one taken from the same scsi_cmnd
> in the same function.  If we could reuse a scsi_cmnd while in the
> ->eh_abort handler for fusion it would have to seriously mess up it's
> locking and lifetime rules.

Well, I think there's method in the madness for the old driver.  What it
seems to worry about is that the command gets reissued after the abort
because the abort routine sleeps.  If the reissue occurred, the same
command could be on the active list with a different serial number.

The theory is currently bogus because we halt all activity on the host
while error handler porcessing is active and the reissue won't occur
until after the abort routine returns.  Although if we did running error
handling, problems like this would arise ...

The new code seems to be an incorrect extract from the old code, so both
can currently go.

James


--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux