ibmvnic: Ensure that CRQ entry read are correctly ordered
authorLijun Pan <ljp@linux.ibm.com>
Thu, 28 Jan 2021 01:34:42 +0000 (19:34 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 7 Feb 2021 14:37:12 +0000 (15:37 +0100)
commit3766a00d765dca6e2c05b18ab95c39fb2d00802c
tree8b34a0cf4a8d0b2ab1c61c3fe02e57c9a0607e98
parentc71bfc5f13c363cbf03a4623b8bf2836d321a4ff
ibmvnic: Ensure that CRQ entry read are correctly ordered

commit e41aec79e62fa50f940cf222d1e9577f14e149dc upstream.

Ensure that received Command-Response Queue (CRQ) entries are
properly read in order by the driver. dma_rmb barrier has
been added before accessing the CRQ descriptor to ensure
the entire descriptor is read before processing.

Fixes: 032c5e82847a ("Driver for IBM System i/p VNIC protocol")
Signed-off-by: Lijun Pan <ljp@linux.ibm.com>
Link: https://lore.kernel.org/r/20210128013442.88319-1-ljp@linux.ibm.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/ibm/ibmvnic.c