Re: [PATCH v2] drm/sched: Fix kernel NULL pointer dereference error

2022-10-13 Thread Yadav, Arvind
On 10/12/2022 7:05 PM, Christian König wrote: That essentially looks like the right approach, but I would go a few steps further. I think we should add a drm_sched_fence_set_parent() function to sched_fence.c and move a good part of the handling into that C file. Just a simple signal functi

Re: [PATCH v2] drm/sched: Fix kernel NULL pointer dereference error

2022-10-12 Thread Christian König
That essentially looks like the right approach, but I would go a few steps further. I think we should add a drm_sched_fence_set_parent() function to sched_fence.c and move a good part of the handling into that C file. Just a simple signal function which tells the scheduler that it should decr

[PATCH v2] drm/sched: Fix kernel NULL pointer dereference error

2022-10-12 Thread Arvind Yadav
This is purely a timing issue. Here, sometimes Job free is happening before the job is done. To fix this issue moving 'dma_fence_cb' callback from job(struct drm_sched_job) to scheduler fence (struct drm_sched_fence). BUG: kernel NULL pointer dereference, address: 0088 #PF: supervisor