From: Robert Olsson Date: Tue, 28 Aug 2007 22:43:14 +0000 (-0700) Subject: [PKTGEN]: Fix multiqueue oops. X-Git-Tag: v2.6.23-rc5~37^2~7 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=378be2c08314fc46e3f814fa264ff8ebdb79712f;p=linux-2.6 [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 Signed-off-by: David S. Miller --- diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 7bae576ac1..4ad62d3753 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)) {