summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorRobert Olsson <robert.olsson@its.uu.se>2007-08-28 15:43:14 -0700
committerDavid S. Miller <davem@davemloft.net>2007-08-28 15:43:14 -0700
commit378be2c08314fc46e3f814fa264ff8ebdb79712f (patch)
tree63624dbb5ddbb25085ed6f0bf9970991fb6dd508 /net
parent594a9dfae7113d9601b2c353754c40d0b7e00a03 (diff)
downloadlinux-stable-378be2c08314fc46e3f814fa264ff8ebdb79712f.tar.gz
linux-stable-378be2c08314fc46e3f814fa264ff8ebdb79712f.tar.bz2
linux-stable-378be2c08314fc46e3f814fa264ff8ebdb79712f.zip
[PKTGEN]: Fix multiqueue oops.
Initially pkt_dev can be NULL this causes netif_subqueue_stopped to oops. The patch below should cure it. But maybe the pktgen TX logic should be reworked to better support the new multiqueue support. Signed-off-by: Robert Olsson <robert.olsson@its.uu.se> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/core/pktgen.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c
index 7bae576ac115..4ad62d375373 100644
--- a/net/core/pktgen.c
+++ b/net/core/pktgen.c
@@ -3331,8 +3331,9 @@ static __inline__ void pktgen_xmit(struct pktgen_dev *pkt_dev)
}
if ((netif_queue_stopped(odev) ||
- netif_subqueue_stopped(odev, pkt_dev->skb->queue_mapping)) ||
- need_resched()) {
+ (pkt_dev->skb &&
+ netif_subqueue_stopped(odev, pkt_dev->skb->queue_mapping))) ||
+ need_resched()) {
idle_start = getCurUs();
if (!netif_running(odev)) {