]> 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 16:56:31 +0000 (16:56 +0000)
commit7383675aba2f18ee94c0951aaec1fc1f39df64c6
tree1f792713d3b4499b8935a238572947345d89d42f
parentcc7efd1054f47e5cb7b1601f70c75969d4b8efbf
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