OSDN Git Service
(root)
/
sagit-ice-cold
/
kernel_xiaomi_msm8998.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c930a66
)
Phonet: fix accounting race between gprs_writeable() and gprs_xmit()
author
Rémi Denis-Courmont
<remi.denis-courmont@nokia.com>
Mon, 1 Jun 2009 00:35:16 +0000
(
00:35
+0000)
committer
David S. Miller
<davem@davemloft.net>
Tue, 2 Jun 2009 07:17:43 +0000
(
00:17
-0700)
In the unlikely event that gprs_writeable() and gprs_xmit() check for
writeability at the same, we could stop the device queue forever.
Signed-off-by: Rémi Denis-Courmont <remi.denis-courmont@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/phonet/pep-gprs.c
patch
|
blob
|
history
diff --git
a/net/phonet/pep-gprs.c
b/net/phonet/pep-gprs.c
index
4aa8885
..
851f6a3
100644
(file)
--- a/
net/phonet/pep-gprs.c
+++ b/
net/phonet/pep-gprs.c
@@
-212,8
+212,9
@@
static int gprs_xmit(struct sk_buff *skb, struct net_device *dev)
dev->stats.tx_bytes += len;
}
- if (!pep_writeable(sk))
- netif_stop_queue(dev);
+ netif_stop_queue(dev);
+ if (pep_writeable(sk))
+ netif_wake_queue(dev);
return 0;
}