Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amdkfd: Fix NULL pointer dereference in svm_migrate_to_ram()

./drivers/gpu/drm/amd/amdkfd/kfd_migrate.c:985:58-62: ERROR: p is NULL but dereferenced.

Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2549
Reported-by: Abaci Robot <abaci@linux.alibaba.com>
Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Yang Li and committed by
Alex Deucher
9682069a d232afb1

+1 -3
+1 -3
drivers/gpu/drm/amd/amdkfd/kfd_migrate.c
··· 973 973 out_unlock_svms: 974 974 mutex_unlock(&p->svms.lock); 975 975 out_unref_process: 976 + pr_debug("CPU fault svms 0x%p address 0x%lx done\n", &p->svms, addr); 976 977 kfd_unref_process(p); 977 978 out_mmput: 978 979 mmput(mm); 979 - 980 - pr_debug("CPU fault svms 0x%p address 0x%lx done\n", &p->svms, addr); 981 - 982 980 return r ? VM_FAULT_SIGBUS : 0; 983 981 } 984 982