diff options
| author | Lizhi Hou <lizhi.hou@amd.com> | 2025-12-12 10:32:44 -0800 |
|---|---|---|
| committer | Lizhi Hou <lizhi.hou@amd.com> | 2025-12-15 09:52:59 -0800 |
| commit | 97f27573837ef96b4ba42af463cc800cab615c0e (patch) | |
| tree | b159d844f144fbc3675b0d402815505afbb78644 /tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git | |
| parent | 2db2d6813003fd47a3527397b1b3847d91288f62 (diff) | |
accel/amdxdna: Fix potential NULL pointer dereference in context cleanup
aie_destroy_context() is invoked during error handling in
aie2_create_context(). However, aie_destroy_context() assumes that the
context's mailbox channel pointer is non-NULL. If mailbox channel
creation fails, the pointer remains NULL and calling aie_destroy_context()
can lead to a NULL pointer dereference.
In aie2_create_context(), replace aie_destroy_context() with a function
which request firmware to remove the context created previously.
Fixes: be462c97b7df ("accel/amdxdna: Add hardware context")
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
Link: https://patch.msgid.link/20251212183244.1826318-1-lizhi.hou@amd.com
Diffstat (limited to 'tools/perf/lib/Documentation/tutorial/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
