Commit 60f6112
drm/amdkfd: Fix kfd process ref leaking when userptr unmapping
[ Upstream commit 58e6fc2 ]
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 <[email protected]>
Reviewed-by: Harish Kasiviswanathan <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Signed-off-by: Sasha Levin <[email protected]>1 parent 842e6c4 commit 60f6112
1 file changed
+7
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2583 | 2583 | | |
2584 | 2584 | | |
2585 | 2585 | | |
| 2586 | + | |
| 2587 | + | |
2586 | 2588 | | |
2587 | 2589 | | |
2588 | 2590 | | |
2589 | 2591 | | |
2590 | | - | |
2591 | | - | |
| 2592 | + | |
| 2593 | + | |
| 2594 | + | |
| 2595 | + | |
| 2596 | + | |
2592 | 2597 | | |
2593 | 2598 | | |
2594 | 2599 | | |
| |||
0 commit comments