diff options
| author | Wentao Liang <vulab@iscas.ac.cn> | 2026-06-06 15:56:06 +0000 |
|---|---|---|
| committer | Danilo Krummrich <dakr@kernel.org> | 2026-06-21 15:06:01 +0200 |
| commit | c3027973f692077a1b66a9fb26d6a7c46c0dc72c (patch) | |
| tree | 33399e4e57392ead822b1602e262af3ccc3b3dd8 /mm/tests/git@git.tavy.me:linux.git | |
| parent | 7caf2a2351d4053075670ff3e26a6815da0a9e1e (diff) | |
drm/nouveau/acr: fix missing nvkm_done() in error path of nvkm_acr_oneinit()
In nvkm_acr_oneinit(), nvkm_kmap(acr->wpr) is invoked unconditionally
at line 309 to obtain a mapping reference. Additionally, when both
acr->wpr_fw and acr->wpr_comp are present, a second nvkm_kmap() is
called inside the conditional block. Both mappings are expected to be
released by nvkm_done(acr->wpr) at line 320 before the function returns
successfully.
However, when a mismatch is detected during the loop within the
conditional block, the function returns -EINVAL at line 318 without
calling nvkm_done(). This results in a leak of the kmap reference(s)
acquired earlier.
Fix the issue by invoking nvkm_done(acr->wpr) prior to the early return
to ensure proper release of the mapping references.
Fixes: 22dcda45a3d1 ("drm/nouveau/acr: implement new subdev to replace "secure boot"")
Cc: stable@vger.kernel.org
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
Link: https://patch.msgid.link/20260606155606.77593-1-vulab@iscas.ac.cn
Signed-off-by: Danilo Krummrich <dakr@kernel.org>
Diffstat (limited to 'mm/tests/git@git.tavy.me:linux.git')
0 files changed, 0 insertions, 0 deletions
