diff options
| author | Lizhi Hou <lizhi.hou@amd.com> | 2026-06-10 18:11:27 +0300 |
|---|---|---|
| committer | Lizhi Hou <lizhi.hou@amd.com> | 2026-06-11 19:50:07 +0300 |
| commit | 2f41af638c92bac6f1f9275ea2d1901baef578f3 (patch) | |
| tree | 89ac96a1ae37f6f1c7755df1aa0c9bc5709bea21 | |
| parent | d79716401a954677a93c4dd51fec65beccb38296 (diff) | |
| download | linux-2f41af638c92bac6f1f9275ea2d1901baef578f3.tar.xz | |
accel/amdxdna: Fix mm_struct reference leak in aie2_populate_range()
aie2_populate_range() jumps back to the again label without calling
mmput(mm), leaking a reference to the mm_struct.
Add the missing mmput() before jumping to again.
Fixes: e486147c912f ("accel/amdxdna: Add BO import and export")
Reviewed-by: Mario Limonciello (AMD) <superm1@kernel.org>
Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
Link: https://patch.msgid.link/20260610151127.2994185-1-lizhi.hou@amd.com
| -rw-r--r-- | drivers/accel/amdxdna/aie2_ctx.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/accel/amdxdna/aie2_ctx.c b/drivers/accel/amdxdna/aie2_ctx.c index 286379d9511d..eed3d0ec5413 100644 --- a/drivers/accel/amdxdna/aie2_ctx.c +++ b/drivers/accel/amdxdna/aie2_ctx.c @@ -999,6 +999,7 @@ again: if (ret == -EBUSY) { amdxdna_umap_put(mapp); + mmput(mm); goto again; } @@ -1009,11 +1010,13 @@ again: if (mmu_interval_read_retry(&mapp->notifier, mapp->range.notifier_seq)) { up_write(&xdna->notifier_lock); amdxdna_umap_put(mapp); + mmput(mm); goto again; } mapp->invalid = false; up_write(&xdna->notifier_lock); amdxdna_umap_put(mapp); + mmput(mm); goto again; put_mm: |
