Messages in this thread | | | Date | Tue, 31 Aug 2004 18:10:40 +0900 | From | Takao Indoh <> | Subject | Re: [PATCH 4/4][diskdump] x86-64 support |
| |
Thanks for comment.
On Sat, 28 Aug 2004 11:23:24 +0100, Christoph Hellwig wrote:
>> +mptscsih_sanity_check(struct scsi_device *sdev) >> +{ >> + MPT_ADAPTER *ioc; >> + MPT_SCSI_HOST *hd; >> + >> + hd = (MPT_SCSI_HOST *) sdev->host->hostdata; >> + if (!hd) >> + return -ENXIO; >> + ioc = hd->ioc; >> + >> + /* message frame freeQ is busy */ >> + if (spin_is_locked(&ioc->FreeQlock)) >> + return -EBUSY; > >As in the scsi code spin_is_locked checks are bogus and racy. Only >a spin_trylock would be safe. hd can't be NULL.
Could you explain to me why spin_is_locked is not safe?
Regards, Takao Indoh - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |