Commit 9a5705f
drm/amdkcl: fix NULL pointer dereference during module unload
The free_xcp_dev() function incorrectly uses the global pdev_num variable
to index into the xcp_dev array. Since pdev_num is decremented during
the loop, it can lead to accessing an incorrect index during concurrent
unloads or error conditions, resulting in a NULL pointer dereference.
Signed-off-by: Chengjun Yao <Chengjun.Yao@amd.com>
Reviewed-by: Bob Zhou <Bob.Zhou@amd.com>1 parent 656a5cf commit 9a5705f
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
115 | | - | |
116 | | - | |
| 115 | + | |
| 116 | + | |
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| |||
0 commit comments