Patch "r8169: fix memory corruption on retrieval of hardware statistics." has been added to the 4.4-stable tree
This is a note to let you know that I've just added the patch titled
r8169: fix memory corruption on retrieval of hardware statistics.
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
r8169-fix-memory-corruption-on-retrieval-of-hardware-statistics.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From foo@baz Mon Jan 29 10:14:57 CET 2018
From: Francois Romieu <[email protected]>
Date: Fri, 26 Jan 2018 01:53:26 +0100
Subject: r8169: fix memory corruption on retrieval of hardware statistics.
From: Francois Romieu <[email protected]>
[ Upstream commit a78e93661c5fd30b9e1dee464b2f62f966883ef7 ]
Hardware statistics retrieval hurts in tight invocation loops.
Avoid extraneous write and enforce strict ordering of writes targeted to the tally counters dump area address registers.
--- drivers/net/ethernet/realtek/r8169.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
drivers/net/ethernet/realtek/r8169.c +2 -7
@@ -2205,19 +2205,14 @@ static bool rtl8169_do_counters(struct nvoid __iomem *ioaddr = tp->mmio_addr;dma_addr_t paddr = tp->counters_phys_addr;u32 cmd; -bool ret;RTL_W32 (CounterAddrHigh, (u64 )paddr >>32 ); +RTL_R32 (CounterAddrHigh); cmd = (u64 )paddr &DMA_BIT_MASK (32 );RTL_W32 (CounterAddrLow, cmd);RTL_W32 (CounterAddrLow, cmd | counter_cmd); - ret =rtl_udelay_loop_wait_low (tp, &rtl_counters_cond,10 ,1000 ); - -RTL_W32 (CounterAddrLow,0 ); -RTL_W32 (CounterAddrHigh,0 ); - -return ret; +return rtl_udelay_loop_wait_low (tp, &rtl_counters_cond,10 ,1000 ); }static bool rtl8169_reset_counters (struct net_device *dev)
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/r8169-fix-memory-corruption-on-retrieval-of-hardware-statistics.patch