Re: Maybe a bug in libata-core

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

 



Dear list,

I'm very sorry I didn't find the time earlier to pursue this matter.
Indeed it was a coding error on my side.  I sat up sg_io_hdr_t correctly
except for one thing: dxfer_len was set to the amount of blocks instead
of block*logical_blocksize - so it was all my bad.

Thank you for the suggestions, it helped finding the error quickly.

Greetings,
Stefan


Am 24.08.2010 09:27, schrieb Tejun Heo:
> Hello,
> 
> On 08/24/2010 12:41 AM, Stefan /*St0fF*/ Hübner wrote:
>> As far as I know my code I thought I did send enough data.  Maybe I'm
>> misunderstanding something: I valloc'ated block_count*logical_block_size
>> bytes, filled them with data and presented this buffer to the
>> sg_io_hdr_t structure by setting dxfer_len to the length of the buffer,
>> setting dxferp to a pointer to the buffer and setting the
>> dxfer_direction to SG_DXFER_TO_DEV.
>>
>> The only thing coming to my mind would be overflow of dxfer_len, but as
>> this is a unsigned int - wouldn't it be 32 bits wide? (and by that
>> accepting f.e. 64k*512 bytes = 33 554 432 bytes (32M, needing 25 bits))
>>
>> Any other suggestions, or do I have to present the code?
> 
> Yeah, posting a simple test case would be the best way to proceed
> here.
> 
> Thanks.
> 

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


[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux