diff options
author | Hariprasad Kelam | 2020-09-30 21:39:35 +0530 |
---|---|---|
committer | David S. Miller | 2020-09-30 15:07:19 -0700 |
commit | 66a5209b53418111757716d71e52727b782eabd4 (patch) | |
tree | d3a6e9925b68b37da0fc98c6447a62a8b51b1c15 /lib/decompress_inflate.c | |
parent | 1ea0166da0509e987caa42c30a6a71f2c6ca1875 (diff) |
octeontx2-pf: Fix synchnorization issue in mbox
Mbox implementation in octeontx2 driver has three states
alloc, send and reset in mbox response. VF allocate and
sends message to PF for processing, PF ACKs them back and
reset the mbox memory. In some case we see synchronization
issue where after msgs_acked is incremented and before
mbox_reset API is called, if current execution is scheduled
out and a different thread is scheduled in which checks for
msgs_acked. Since the new thread sees msgs_acked == msgs_sent
it will try to allocate a new message and to send a new mbox
message to PF.Now if mbox_reset is scheduled in, PF will see
'0' in msgs_send.
This patch fixes the issue by calling mbox_reset before
incrementing msgs_acked flag for last processing message and
checks for valid message size.
Fixes: d424b6c02 ("octeontx2-pf: Enable SRIOV and added VF mbox handling")
Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
Signed-off-by: Geetha sowjanya <gakula@marvell.com>
Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'lib/decompress_inflate.c')
0 files changed, 0 insertions, 0 deletions