* [PATCH] fix: crypto/tegra: tegra_se_host1x_submit: timeout path leaks host1x_job reference
@ 2026-06-26 12:14 WenTao Liang
2026-06-26 15:07 ` Akhil R
0 siblings, 1 reply; 2+ messages in thread
From: WenTao Liang @ 2026-06-26 12:14 UTC (permalink / raw)
To: akhilrajeev, herbert, davem, thierry.reding, jonathanh
Cc: linux-crypto, linux-tegra, linux-kernel, WenTao Liang, stable
When host1x_syncpt_wait returns a timeout error, the function returns ret
directly without calling host1x_job_put(job). The job reference acquired
by host1x_job_alloc is properly released on all other error paths via the
job_put label but is missing on the timeout path.
Cc: stable@vger.kernel.org
Fixes: 0880bb3b00c8 ("crypto: tegra - Add Tegra Security Engine driver")
Signed-off-by: WenTao Liang <vulab@iscas.ac.cn>
---
drivers/crypto/tegra/tegra-se-main.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/crypto/tegra/tegra-se-main.c b/drivers/crypto/tegra/tegra-se-main.c
index eb71113ed146..7fbf69236ff2 100644
--- a/drivers/crypto/tegra/tegra-se-main.c
+++ b/drivers/crypto/tegra/tegra-se-main.c
@@ -180,6 +180,7 @@ int tegra_se_host1x_submit(struct tegra_se *se, struct tegra_se_cmdbuf *cmdbuf,
MAX_SCHEDULE_TIMEOUT, NULL);
if (ret) {
dev_err(se->dev, "host1x job timed out\n");
+ host1x_job_put(job);
return ret;
}
--
2.39.5 (Apple Git-154)
^ permalink raw reply related [flat|nested] 2+ messages in thread* [PATCH] fix: crypto/tegra: tegra_se_host1x_submit: timeout path leaks host1x_job reference
2026-06-26 12:14 [PATCH] fix: crypto/tegra: tegra_se_host1x_submit: timeout path leaks host1x_job reference WenTao Liang
@ 2026-06-26 15:07 ` Akhil R
0 siblings, 0 replies; 2+ messages in thread
From: Akhil R @ 2026-06-26 15:07 UTC (permalink / raw)
To: vulab
Cc: akhilrajeev, davem, herbert, jonathanh, linux-crypto,
linux-kernel, linux-tegra, stable, thierry.reding
On Fri, 26 Jun 2026 20:14:53 +0800, WenTao Liang wrote:
> When host1x_syncpt_wait returns a timeout error, the function returns ret
> directly without calling host1x_job_put(job). The job reference acquired
> by host1x_job_alloc is properly released on all other error paths via the
> job_put label but is missing on the timeout path.
>
> Cc: stable@vger.kernel.org
> Fixes: 0880bb3b00c8 ("crypto: tegra - Add Tegra Security Engine driver")
> Signed-off-by: WenTao Liang <vulab@iscas.ac.cn>
This fix is already applied in linux-next as commit 6ea0ce3a19f9
("crypto: tegra - fix refcount leak in tegra_se_host1x_submit()").
https://lore.kernel.org/linux-tegra/aip3_Hqk876NZFHf@gondor.apana.org.au/T/#t
Regards,
Akhil
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-06-26 15:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-26 12:14 [PATCH] fix: crypto/tegra: tegra_se_host1x_submit: timeout path leaks host1x_job reference WenTao Liang
2026-06-26 15:07 ` Akhil R
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox