'buf' pointer in ttm_bo_vm_access_kmap()

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

 



On 2018-01-26 09:40 AM, Tom St Denis wrote:
> On 26/01/18 09:38 AM, Christian König wrote:
>> Am 26.01.2018 um 15:31 schrieb Tom St Denis:
>>> Hi all,
>>>
>>> In the function ttm_bo_vm_access_kmap() it doesn't seem to me like
>>> the 'buf' pointer is incremented.  That seems like a bug no?
>>
>> Yeah, looks suspicious to me as well. But TTM questions should CC the
>> dri list as well.
>>
>> And in this particular case I think Felix was the author that function.
>>
>
> Hi Christian,
>
> I'm authoring a set of mostly NFC patches for TTM and already crafted
> a fix for this in the process.
>
> If the fix (which is literally "buf += bytes" at the end of the while
> loop) doesn't get NAK'ed I'll submit it as part of my cleanup patches.

Thanks for catching that. The fix sounds reasonable. Since buf is a void
pointer, you may need to cast it to (uint8_t *) or (char *) for sane
pointer arithmetics.

I'll update KFDTest to include ptace system memory accesses across page
boundaries. I did a similar thing for the VRAM test crossing
non-contiguous VRAM boundaries.

Regards,
  Felix

>
> Cheers,
> Tom



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux