[ofa-general] Re: [PATCH] drivers/infiniband/ulp/srpt: Fix targetdata corruption

Vu Pham vuhuong at mellanox.com
Tue Jan 29 16:23:36 PST 2008


Sufficool, Stanley wrote:
> When did ib_srpt start registering sessions with target node GUID? I
> thought it used the port GUID on target side.
>
ib_srpt used to use {target port GUID + initiator port GUID} 
as session name

ib_srpt recently changed to use full initiator_port_ID 
(128-bit) as session name to register session.

You can look at commit 15f6176b9bcc7b8122eb799b38deb09ece83bbab

         init_completion(&ch->scst_sess_done);

         sprintf(ch->sess_name, "0x%016llx%016llx",

-               (unsigned long long)be64_to_cpu(*(u64 
*)&sdev->port[param->port - 1].gid.raw[8]),

-               (unsigned long long)be64_to_cpu(*(u64 *) 
(ch->i_port_id + 8)));

+               (unsigned long long)be64_to_cpu(*(u64 
*)ch->i_port_id),

+               (unsigned long long)be64_to_cpu(*(u64 
*)(ch->i_port_id + 8)));

         ch->scst_sess =

             scst_register_session(sdev->scst_tgt, 1, 
ch->sess_name,

                                   ch, 
srpt_register_channel_done);


> 
>> -----Original Message-----
>> From: general-bounces at lists.openfabrics.org 
>> [mailto:general-bounces at lists.openfabrics.org] On Behalf Of Vu Pham
>> Sent: Friday, January 25, 2008 9:01 AM
>> To: davem at systemfabricworks.com
>> Cc: general at lists.openfabrics.org
>> Subject: [ofa-general] Re: [PATCH] 
>> drivers/infiniband/ulp/srpt: Fix targetdata corruption
>>
>>
>> davem at systemfabricworks.com wrote:
>>>    Change the local buffer allocator to use a spin-lock 
>> protected linked
>>>    list instead of an array of atomic_t used/free 
>> variables.  The atomic_t
>>>    code was open to a multi-thread race between test and 
>> set.  This has
>>>    been observed with the result that the same data buffer 
>> was used for
>>>    more than one SCSI operation, either writing the wrong 
>> data to the disk
>>>    or sending the wrong data to the initiator.
>>>
>>> Signed-off-by: Robert Pearson <rpearson at systemfabricworks.com>
>>> Signed-off-by: David A. McMillen <davem at systemfabricworks.com>
>>>   
>> Applied. Thanks
>> _______________________________________________
>> general mailing list
>> general at lists.openfabrics.org 
>> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
>>
>> To unsubscribe, please visit 
>> http://openib.org/mailman/listinfo/openib-general
>>




More information about the general mailing list