Commit 58e6fc2
drm/amdkfd: Fix kfd process ref leaking when userptr unmapping
kfd_lookup_process_by_pid hold the kfd process reference to ensure it
doesn't get destroyed while sending the segfault event to user space.
Calling kfd_lookup_process_by_pid as function parameter leaks the kfd
process refcount and miss the NULL pointer check if app process is
already destroyed.
Fixes: 2d274bf ("amd/amdkfd: Trigger segfault for early userptr unmmapping")
Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Reviewed-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>1 parent 0c67342 commit 58e6fc2
1 file changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2586 | 2586 | | |
2587 | 2587 | | |
2588 | 2588 | | |
| 2589 | + | |
| 2590 | + | |
2589 | 2591 | | |
2590 | 2592 | | |
2591 | 2593 | | |
2592 | 2594 | | |
2593 | | - | |
2594 | | - | |
| 2595 | + | |
| 2596 | + | |
| 2597 | + | |
| 2598 | + | |
| 2599 | + | |
2595 | 2600 | | |
2596 | 2601 | | |
2597 | 2602 | | |
| |||
0 commit comments