]> www.infradead.org Git - users/dwmw2/linux.git/commit
sfc: extend the locking on mcdi->seqno
authorNiels Dossche <dossche.niels@gmail.com>
Tue, 1 Mar 2022 22:28:22 +0000 (23:28 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 19 Mar 2022 12:44:46 +0000 (13:44 +0100)
commit2490695ffdbafbe79fb9c204df33a4597b1473b4
treefee9d04090f6e188676c0c6d71ac6cb53668c7e7
parent2fad5b6948963bac235eac8261d4cd9165eaf1c2
sfc: extend the locking on mcdi->seqno

[ Upstream commit f1fb205efb0ccca55626fd4ef38570dd16b44719 ]

seqno could be read as a stale value outside of the lock. The lock is
already acquired to protect the modification of seqno against a possible
race condition. Place the reading of this value also inside this locking
to protect it against a possible race condition.

Signed-off-by: Niels Dossche <dossche.niels@gmail.com>
Acked-by: Martin Habets <habetsm.xilinx@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/sfc/mcdi.c