]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
RDMA/irdma: Add missing read barriers
authorShiraz Saleem <shiraz.saleem@intel.com>
Tue, 11 Jul 2023 17:52:51 +0000 (12:52 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 3 Aug 2023 08:22:37 +0000 (10:22 +0200)
commitfd6e50ec2c387a45acd290ba0aa85e74cc9eadbb
treebc3ddb877bc3ef9824ce36a470acb15f4f4887fb
parent5fbb5068d2bdc1f0ec454560b05dbce1d4a94d81
RDMA/irdma: Add missing read barriers

[ Upstream commit 4984eb51453ff7eddee9e5ce816145be39c0ec5c ]

On code inspection, there are many instances in the driver where
CEQE and AEQE fields written to by HW are read without guaranteeing
that the polarity bit has been read and checked first.

Add a read barrier to avoid reordering of loads on the CEQE/AEQE fields
prior to checking the polarity bit.

Fixes: 3f49d6842569 ("RDMA/irdma: Implement HW Admin Queue OPs")
Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com>
Link: https://lore.kernel.org/r/20230711175253.1289-2-shiraz.saleem@intel.com
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/infiniband/hw/irdma/ctrl.c
drivers/infiniband/hw/irdma/puda.c
drivers/infiniband/hw/irdma/uk.c