diff options
author | Jeffrey Hugo <quic_jhugo@quicinc.com> | 2023-05-17 22:35:40 +0300 |
---|---|---|
committer | Jeffrey Hugo <quic_jhugo@quicinc.com> | 2023-05-23 18:51:38 +0300 |
commit | e997c218ad736fd6f524d73a987bad9d94128d3d (patch) | |
tree | 90cc9c9908228f4eae8a0f5444535ae161dfb752 /Documentation/powerpc/pmu-ebb.rst | |
parent | 75af0a585af93183ba68bb1b45d0d7a61e963712 (diff) | |
download | linux-e997c218ad736fd6f524d73a987bad9d94128d3d.tar.xz |
accel/qaic: Fix NNC message corruption
If msg_xfer() is unable to queue part of a NNC message because the MHI ring
is full, it will attempt to give the QSM some time to drain the queue.
However, if QSM fails to make any room, msg_xfer() will fail and tell the
caller to try again. This is problematic because part of the message may
have been committed to the ring and there is no mechanism to revoke that
content. This will cause QSM to receive a corrupt message.
The better way to do this is to check if the ring has enough space for the
entire message before committing any of the message. Since msg_xfer() is
under the cntl_mutex no one else can come in and consume the space.
Fixes: 129776ac2e38 ("accel/qaic: Add control path")
Signed-off-by: Jeffrey Hugo <quic_jhugo@quicinc.com>
Reviewed-by: Pranjal Ramajor Asha Kanojiya <quic_pkanojiy@quicinc.com>
Reviewed-by: Carl Vanderlip <quic_carlv@quicinc.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20230517193540.14323-6-quic_jhugo@quicinc.com
Diffstat (limited to 'Documentation/powerpc/pmu-ebb.rst')
0 files changed, 0 insertions, 0 deletions