]> git.ipfire.org Git - thirdparty/kernel/stable.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>
Wed, 23 Mar 2022 08:01:35 +0000 (09:01 +0100)
commit707a248f661f57b3e27851b2901d4f03674cbd44
treec47c43aa9bd4b1258107f4a84e65a2c565bc64bb
parentb630da9e2542973dc0f96efe6760abfd1b8006ea
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