]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
i3c: master: svc: fix race condition in ibi work thread
authorFrank Li <Frank.Li@nxp.com>
Mon, 23 Oct 2023 16:16:53 +0000 (12:16 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Nov 2023 17:15:08 +0000 (17:15 +0000)
commit3cce94303f3d43373db331c3425005139c55699b
tree8cba7123059ecc4b9d5aebdf42078404401ca50e
parent7dc6161114a3b950bb8eb23ba034e53076ba9013
i3c: master: svc: fix race condition in ibi work thread

commit 6bf3fc268183816856c96b8794cd66146bc27b35 upstream.

The ibi work thread operates asynchronously with other transfers, such as
svc_i3c_master_priv_xfers(). Introduce mutex protection to ensure the
completion of the entire i3c/i2c transaction.

Fixes: dd3c52846d59 ("i3c: master: svc: Add Silvaco I3C master driver")
Cc: <stable@vger.kernel.org>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Link: https://lore.kernel.org/r/20231023161658.3890811-2-Frank.Li@nxp.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/i3c/master/svc-i3c-master.c