Re: [PATCH] scsi_lib.c: sleeping function called from invalid context

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

 



On Tue, 2009-10-06 at 12:30 +0000, iceberg wrote:
> James, what about code where spin_unlock is called before scsi_device_put, 
> especially for avoiding atomic context?
> In code like 
> 	spin_unlock
> 	scsi_device_put
> 	spin_lock
> Is spin_unlock/spin_lock redundant?

Depends on context ... most of them are actually swapping locks or
providing pre-emption points ... it could be redundant, but doesn't have
to be.

> Why do we need scsi_device_get/scsi_device_put pair in scsi_lib.c at all? If 
> we are sure that scsi_device_put is always not last, for what purpose do we 
> call it together with scsi_device_get in the loop?

We're not sure (and never can be in a hotplug world) that any put isn't
the last one.

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