回复: 回复: [PATCH] drm/amdgpu: fix a bug NULL pointer dereference
Liu, Monk
Monk.Liu at amd.com
Thu Feb 20 15:25:39 UTC 2020
Isn't from me... damn keyboard
-----邮件原件-----
发件人: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> 代表 Liu, Monk
发送时间: 2020年2月20日 23:24
收件人: Das, Nirmoy <Nirmoy.Das at amd.com>; amd-gfx at lists.freedesktop.org
主题: 回复: 回复: [PATCH] drm/amdgpu: fix a bug NULL pointer dereference
I don't know
The patch is from me, I just think the patch is dropping a vm update which looks not perfect to me
-----邮件原件-----
发件人: amd-gfx <amd-gfx-bounces at lists.freedesktop.org> 代表 Nirmoy
发送时间: 2020年2月20日 23:21
收件人: amd-gfx at lists.freedesktop.org
主题: Re: 回复: [PATCH] drm/amdgpu: fix a bug NULL pointer dereference
Hi Monk,
How can I reproduce this bug ?
Regards,
Nirmoy
On 2/20/20 4:15 PM, Nirmoy wrote:
>
> On 2/20/20 2:35 PM, Liu, Monk wrote:
>> Sorry, my previous idea still leave RQ null, please check if below
>> method works:
>>
>> 29 static struct drm_sched_rq *
>> 130 drm_sched_entity_get_free_sched(struct drm_sched_entity *entity)
>> 131 {
>> 132 struct drm_sched_rq *rq = NULL;
>> 133 unsigned int min_jobs = UINT_MAX, num_jobs;
>> 134 int i;
>>
>> 135
>> While (!mutex_trylock(....))
>> Sleep()
> We can't do that drm_sched_entity_get_free_sched is in another
> module(drm scheduler) independent of amdgpu
>> 136 for (i = 0; i < entity->num_rq_list; ++i) {
>> 137 struct drm_gpu_scheduler *sched =
>> entity->rq_list[i]->sched;
>> 138
>> 139 if (!entity->rq_list[i]->sched->ready) { //we take the
>> gpu reset mutex lock, so now sched->ready won't be set to "not ready"
>> 140 DRM_WARN("sched%s is not ready, skipping",
>> sched->name);
>> 141 continue;
>> 142 }
>> 143
>> 144 num_jobs = atomic_read(&sched->num_jobs);
>> 145 if (num_jobs < min_jobs) {
>> 146 min_jobs = num_jobs;
>> 147 rq = entity->rq_list[i];
>> 148 }
>> 149 }
>>
>> Mutex_unlock(...)
>>
>> 150
>> 151 return rq;
>> 152 }
>>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flist
> s.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Cmo
> nk.liu%40amd.com%7C3635fc8baa4d4b90387108d7b6188069%7C3dd8961fe4884e60
> 8e11a82d994e183d%7C0%7C0%7C637178088661253651&sdata=Ki0SmulPESLIj7
> dGyT10Be0zXungK4U9fXONp45NjaA%3D&reserved=0
>
_______________________________________________
amd-gfx mailing list
amd-gfx at lists.freedesktop.org
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Cmonk.liu%40amd.com%7C81ad7d959e7a4ed972bb08d7b618fc41%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637178090738811091&sdata=7BAfVNQKI92Mbw7B2kBRYoEnM2OxDwtedu%2FM7r6cJZ4%3D&reserved=0
_______________________________________________
amd-gfx mailing list
amd-gfx at lists.freedesktop.org
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Famd-gfx&data=02%7C01%7Cmonk.liu%40amd.com%7C81ad7d959e7a4ed972bb08d7b618fc41%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637178090738811091&sdata=7BAfVNQKI92Mbw7B2kBRYoEnM2OxDwtedu%2FM7r6cJZ4%3D&reserved=0
More information about the amd-gfx
mailing list