projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cceea98
)
bnx2: Protect tx timeout reset with rtnl_lock().
author
Michael Chan
<mchan@broadcom.com>
Thu, 3 Dec 2009 09:46:31 +0000
(09:46 +0000)
committer
David S. Miller
<davem@davemloft.net>
Thu, 3 Dec 2009 21:18:09 +0000
(13:18 -0800)
To prevent race conditions with other reset events.
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/bnx2.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/net/bnx2.c
b/drivers/net/bnx2.c
index 4cae2a86e7418162771eac8143cfc1009fec2c76..03eb51f1c6940ecbd72c4242a4711d51b1bcccc4 100644
(file)
--- a/
drivers/net/bnx2.c
+++ b/
drivers/net/bnx2.c
@@
-6263,8
+6263,11
@@
bnx2_reset_task(struct work_struct *work)
{
struct bnx2 *bp = container_of(work, struct bnx2, reset_task);
- if (!netif_running(bp->dev))
+ rtnl_lock();
+ if (!netif_running(bp->dev)) {
+ rtnl_unlock();
return;
+ }
bnx2_netif_stop(bp);
@@
-6272,6
+6275,7
@@
bnx2_reset_task(struct work_struct *work)
atomic_set(&bp->intr_sem, 1);
bnx2_netif_start(bp);
+ rtnl_unlock();
}
static void