This is a note to let you know that I've just added the patch titled
tg3: Fix race condition in tg3_get_stats64()
to the 3.5-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:
tg3-fix-race-condition-in-tg3_get_stats64.patch
and it can be found in the queue-3.5 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From 0f566b208b41918053b2e67399673aaec02dde5d Mon Sep 17 00:00:00 2001
From: Michael Chan <[email protected]>
Date: Sun, 29 Jul 2012 19:15:44 +0000
Subject: tg3: Fix race condition in tg3_get_stats64()
From: Michael Chan <[email protected]>
commit 0f566b208b41918053b2e67399673aaec02dde5d upstream.
Spinlock should be taken before checking for tp->hw_stats.
Signed-off-by: Michael Chan <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/net/ethernet/broadcom/tg3.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- a/drivers/net/ethernet/broadcom/tg3.c
+++ b/drivers/net/ethernet/broadcom/tg3.c
@@ -12282,10 +12282,12 @@ static struct rtnl_link_stats64 *tg3_get
{
struct tg3 *tp = netdev_priv(dev);
- if (!tp->hw_stats)
+ spin_lock_bh(&tp->lock);
+ if (!tp->hw_stats) {
+ spin_unlock_bh(&tp->lock);
return &tp->net_stats_prev;
+ }
- spin_lock_bh(&tp->lock);
tg3_get_nstats(tp, stats);
spin_unlock_bh(&tp->lock);
Patches currently in stable-queue which might be from [email protected] are
queue-3.5/tg3-fix-race-condition-in-tg3_get_stats64.patch
queue-3.5/tg3-add-device-id-of-apple-thunderbolt-ethernet-device.patch
queue-3.5/tg3-fix-read-dma-workaround-for-5719-a0.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html