]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: hns3: add barrier in vf mailbox reply process
authorYonglong Liu <liuyonglong@huawei.com>
Fri, 10 Nov 2023 09:37:08 +0000 (17:37 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Nov 2023 16:56:22 +0000 (16:56 +0000)
commita3c65cf7854da99dae71a6c6b77fa2fdc357a78e
tree51741785e20d78f00e99d671d029b6681af71981
parente671d8203758c4c9f27890b2052bdbf714ee7583
net: hns3: add barrier in vf mailbox reply process

[ Upstream commit ac92c0a9a0603fb448e60f38e63302e4eebb8035 ]

In hclgevf_mbx_handler() and hclgevf_get_mbx_resp() functions,
there is a typical store-store and load-load scenario between
received_resp and additional_info. This patch adds barrier
to fix the problem.

Fixes: 4671042f1ef0 ("net: hns3: add match_id to check mailbox response from PF to VF")
Signed-off-by: Yonglong Liu <liuyonglong@huawei.com>
Signed-off-by: Jijie Shao <shaojijie@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/hisilicon/hns3/hns3vf/hclgevf_mbx.c