BUG: KASAN: use-after-free in amdgpu_job_free_cb

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

 



Yea, I know , just dumped diff of one file into it, please search in 
code for

"ret = do_aquire_global_lock(dev, state);" it appears only in one place 
in entire code base, and manually apply the one line change.


Thanks,

Andrey


On 01/12/2018 04:47 PM, Johannes Hirte wrote:
> On 2018 Jan 12, Andrey Grodzovsky wrote:
>> Hi, looks to me  like a different issue (not related) then the one
>> Johannes, reports, your issue was already reported by some one (can't
>> remember the thread of hand) and looks like in shader hang or GPU
>> scheduler synchronization issue while  Johannes's use after free is pure
>> software logic issue in either KMS atomic framework or more probably in
>> AMDGPU/DC (DAL).
>>
>>
>> Johanes, I attached a debug patch which forces the cursor update to wait
>> for any  page flip in progress, can you give it a try and see if the
>> issue is gone ? This is not an actual fix but just to evaluate the reason.
>>
>> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> index 5a70682..323d020 100644
>> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> @@ -4908,7 +4908,7 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
>>           * synchronization events.
>>           */
>>   
>> -       if (lock_and_validation_needed) {
>> +       if (lock_and_validation_needed || state->legacy_cursor_update == true) {
>>   
>>                  ret = do_aquire_global_lock(dev, state);
>>                  if (ret)
>> diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c b/drivers/gpu/drm/ttm/ttm_page_alloc.c
>> index a1a751b..6d6ffdf 100644
>> --- a/drivers/gpu/drm/ttm/ttm_page_alloc.c
>> +++ b/drivers/gpu/drm/ttm/ttm_page_alloc.c
> The patch seems incomplete.
>



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

  Powered by Linux