Commit cc9a8e2
drm/amdgpu/atom: Check kcalloc() for WS buffer in amdgpu_atom_execute_table_locked()
kcalloc() may fail. When WS is non-zero and allocation fails, ectx.ws
remains NULL while ectx.ws_size is set, leading to a potential NULL
pointer dereference in atom_get_src_int() when accessing WS entries.
Return -ENOMEM on allocation failure to avoid the NULL dereference.
Signed-off-by: Guangshuo Li <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>1 parent 59e4405 commit cc9a8e2
1 file changed
+4
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1246 | 1246 | | |
1247 | 1247 | | |
1248 | 1248 | | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
1249 | 1253 | | |
1250 | 1254 | | |
1251 | 1255 | | |
| |||
0 commit comments