]> git.baikalelectronics.ru Git - kernel.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)
committerDavid S. Miller <davem@davemloft.net>
Thu, 3 Mar 2022 14:11:58 +0000 (14:11 +0000)
commit6d7516d68b6c758338b800dc1f2866d766ec62fa
tree6b78cbee62e32b111159b71959417620b7c35a32
parentc4d5d12fc274b1aef7544da92167eee6e2e4dc22
sfc: extend the locking on mcdi->seqno

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>
drivers/net/ethernet/sfc/mcdi.c