Commit 6d3eb165 authored by Heiner Kallweit's avatar Heiner Kallweit Committed by Greg Kroah-Hartman
Browse files

r8169: remove unneeded memory barrier in rtl_tx



[ Upstream commit 3a689e34 ]

tp->dirty_tx isn't changed outside rtl_tx(). Therefore I see no need
to guarantee a specific order of reading tp->dirty_tx and tp->cur_tx.
Having said that we can remove the memory barrier.
In addition use READ_ONCE() when reading tp->cur_tx because it can
change in parallel to rtl_tx().

Signed-off-by: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Link: https://lore.kernel.org/r/2264563a-fa9e-11b0-2c42-31bc6b8e2790@gmail.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Stable-dep-of: c71e3a5c ("r8169: Fix possible ring buffer corruption on fragmented Tx packets.")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 40a697e3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment