]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ibmvnic: Ensure that SCRQ entry reads are correctly ordered
authorThomas Falcon <tlfalcon@linux.ibm.com>
Tue, 1 Dec 2020 15:52:10 +0000 (09:52 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 8 Dec 2020 09:18:53 +0000 (10:18 +0100)
commit8d0bca0997a6e6ca5c7ae0e3f74a1372a8305778
tree9bd5a9c172d405b7dcf4fb8ec6435defb002837d
parentdbd97d579e60fae91a2db06e7b02b8f3a4a0872a
ibmvnic: Ensure that SCRQ entry reads are correctly ordered

[ Upstream commit b71ec952234610b4f90ef17a2fdcb124d5320070 ]

Ensure that received Subordinate Command-Response Queue (SCRQ)
entries are properly read in order by the driver. These queues
are used in the ibmvnic device to process RX buffer and TX completion
descriptors. dma_rmb barriers have been added after checking for a
pending descriptor to ensure the correct descriptor entry is checked
and after reading the SCRQ descriptor to ensure the entire
descriptor is read before processing.

Fixes: 032c5e82847a ("Driver for IBM System i/p VNIC protocol")
Signed-off-by: Thomas Falcon <tlfalcon@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/ibm/ibmvnic.c