lkml.org 
[lkml]   [2004]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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/

\
 
 \ /
  Last update: 2005-03-22 14:05    [W:0.139 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site