diff options
| author | Adrian Hunter <adrian.hunter@intel.com> | 2026-03-06 10:24:42 +0300 |
|---|---|---|
| committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2026-03-12 00:10:01 +0300 |
| commit | 4decbbc8a8cf0a69ab011d7c2c88ed3cd0a00ddd (patch) | |
| tree | 65cceb5250fad6fbaecf3f483743626e3046d907 /include | |
| parent | fa12bb903bc3ed1826e355d267fe134bde95e23c (diff) | |
| download | linux-4decbbc8a8cf0a69ab011d7c2c88ed3cd0a00ddd.tar.xz | |
i3c: mipi-i3c-hci: Fix race in DMA ring enqueue for parallel xfers
The I3C subsystem allows multiple transfers to be queued concurrently.
However, the MIPI I3C HCI driver's DMA enqueue path, hci_dma_queue_xfer(),
lacks sufficient serialization.
In particular, the allocation of the enqueue_ptr and its subsequent update
in the RING_OPERATION1 register, must be done atomically. Otherwise, for
example, it would be possible for 2 transfers to be allocated the same
enqueue_ptr.
Extend the use of the existing spinlock for that purpose. Keep a count of
the number of xfers enqueued so that it is easy to determine if the ring
has enough space.
Fixes: 9ad9a52cce282 ("i3c/master: introduce the mipi-i3c-hci driver")
Cc: stable@vger.kernel.org
Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Link: https://patch.msgid.link/20260306072451.11131-6-adrian.hunter@intel.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
