summaryrefslogtreecommitdiff
path: root/drivers/i3c
diff options
context:
space:
mode:
authorStanley Chu <stanley.chuys@gmail.com>2025-08-29 09:23:09 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-10-19 16:21:31 +0200
commit7ac8f7a18645108a4fc6b382e2e0d65f14253a7e (patch)
tree8b6aec2061da2ea575730fdb891c46bc570d9db6 /drivers/i3c
parent11269c08013f4ee8b8f5edc6c56700acb34092d0 (diff)
downloadlinux-7ac8f7a18645108a4fc6b382e2e0d65f14253a7e.tar.gz
linux-7ac8f7a18645108a4fc6b382e2e0d65f14253a7e.tar.bz2
linux-7ac8f7a18645108a4fc6b382e2e0d65f14253a7e.zip
i3c: master: svc: Recycle unused IBI slot
[ Upstream commit 3448a934ba6f803911ac084d05a2ffce507ea6c6 ] In svc_i3c_master_handle_ibi(), an IBI slot is fetched from the pool to store the IBI payload. However, when an error condition is encountered, the function returns without recycling the IBI slot, resulting in an IBI slot leak. Fixes: c85e209b799f ("i3c: master: svc: fix ibi may not return mandatory data byte") Signed-off-by: Stanley Chu <yschu@nuvoton.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Link: https://lore.kernel.org/r/20250829012309.3562585-3-yschu@nuvoton.com Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/i3c')
-rw-r--r--drivers/i3c/master/svc-i3c-master.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/i3c/master/svc-i3c-master.c b/drivers/i3c/master/svc-i3c-master.c
index 62a4d06bcfb5..27f55b5e388d 100644
--- a/drivers/i3c/master/svc-i3c-master.c
+++ b/drivers/i3c/master/svc-i3c-master.c
@@ -308,6 +308,7 @@ static int svc_i3c_master_handle_ibi(struct svc_i3c_master *master,
SVC_I3C_MSTATUS_COMPLETE(val), 0, 1000);
if (ret) {
dev_err(master->dev, "Timeout when polling for COMPLETE\n");
+ i3c_generic_ibi_recycle_slot(data->ibi_pool, slot);
return ret;
}