Thread (2 messages) flat view 2 messages, 2 authors, 2017-01-08

Re: [PATCH net] tg3: Fix race condition in tg3_get_stats64().

From: David Miller <davem@davemloft.net>
Date: 2017-01-08 02:35:21

From: Michael Chan <michael.chan@broadcom.com>
Date: Fri,  6 Jan 2017 16:18:53 -0500
The driver's ndo_get_stats64() method is not always called under RTNL.
So it can race with driver close or ethtool reconfigurations.  Fix the
race condition by taking tp->lock spinlock in tg3_free_consistent()
when freeing the tp->hw_stats memory block.  tg3_get_stats64() is
already taking tp->lock.

Reported-by: Wang Yufen <redacted>
Signed-off-by: Michael Chan <michael.chan@broadcom.com>
Applied, thanks Michael.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help