diff options
author | Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com> | 2025-03-23 15:49:06 +0300 |
---|---|---|
committer | Lucas De Marchi <lucas.demarchi@intel.com> | 2025-04-29 08:18:27 +0300 |
commit | c1c9cad50c5c35cd4de1b54af59a28bf07451593 (patch) | |
tree | bb15e0bfe60fdc34ddd8dbe12bb62ba07fcdc21d /tools/lib/api/fs/tracing_path.c | |
parent | b4432656b36e5cc1d50a1f2dc15357543add530e (diff) | |
download | linux-c1c9cad50c5c35cd4de1b54af59a28bf07451593.tar.xz |
drm/xe/svm: fix dereferencing error pointer in drm_gpusvm_range_alloc()
xe_svm_range_alloc() returns ERR_PTR(-ENOMEM) on failure and there is a
dereference of "range" after that:
--> range->gpusvm = gpusvm;
In xe_svm_range_alloc(), when memory allocation fails return NULL
instead to handle this situation.
Fixes: 99624bdff867 ("drm/gpusvm: Add support for GPU Shared Virtual Memory")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/all/adaef4dd-5866-48ca-bc22-4a1ddef20381@stanley.mountain/
Signed-off-by: Harshit Mogalapalli <harshit.m.mogalapalli@oracle.com>
Reviewed-by: Matthew Brost <matthew.brost@intel.com>
Signed-off-by: Matthew Brost <matthew.brost@intel.com>
Link: https://lore.kernel.org/r/20250323124907.3946370-1-harshit.m.mogalapalli@oracle.com
(cherry picked from commit 7a0322122cfdd9a6f10fc7701023d75c98eb3d22)
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com>
Diffstat (limited to 'tools/lib/api/fs/tracing_path.c')
0 files changed, 0 insertions, 0 deletions