Skip to contentSkip to conversation

: remove netif_running() check from myri10ge_poll()

PATCH In review Andrew Gallatin 4 participants 5 messages Dec 12, 2007 – Dec 21, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : remove netif_running() check from myri10ge_poll()

Remove the bogus netif_running() check from myri10ge_poll().

This eliminates any chance that myri10ge_poll() can trigger an oops by calling netif_rx_complete() and returning with work_done == budget.

drivers/net/myri10ge/myri10ge.c +1 -1
index 8def865..c90958f 100644
@@ -1239,7 +1239,7 @@ static int myri10ge_poll(struct napi_str
 	/* process as many rx events as NAPI will allow */
 	work_done = myri10ge_clean_rx_done(mgp, budget);
 
-	if (work_done < budget || !netif_running(netdev)) {
+	if (work_done < budget) {
 		netif_rx_complete(netdev, napi);
 		put_be32(htonl(3), mgp->irq_claim);
 	}
#2 lore raw
Quoted 5 lines · On Wed, 12 Dec 2007 11:02:43 -0800 (PST) David Miller <[email protected]>…

From: Andrew Gallatin <[email protected]>
Date: Wed, 12 Dec 2007 13:38:34 -0500

Quoted 2 lines

Remove the bogus netif_running() check from myri10ge_poll().

Quoted 7 lines
Quoted 5 lines

This eliminates any chance that myri10ge_poll() can trigger an oops by calling netif_rx_complete() and returning with work_done == budget.

hm, eight days old, fixes a possible oops and hasn't been merged anywhere yet?

I'll put it in my for-2.6.24-via-other-subsystem queue.

maintainer
#3 lore raw

From: Andrew Morton <[email protected]>
Date: Thu, 20 Dec 2007 16:05:18 -0800

Quoted 12 lines
Quoted 9 lines · On Wed, 12 Dec 2007 11:02:43 -0800 (PST) David Miller <[email protected]>…

From: Andrew Gallatin <[email protected]>
Date: Wed, 12 Dec 2007 13:38:34 -0500

Quoted 6 lines

Remove the bogus netif_running() check from myri10ge_poll().

This eliminates any chance that myri10ge_poll() can trigger an oops by calling netif_rx_complete() and returning with work_done == budget.

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

hm, eight days old, fixes a possible oops and hasn't been merged anywhere yet?

I'll put it in my for-2.6.24-via-other-subsystem queue.

This actually adds a bug back into the code.

We're trying to work out how to cleanly break out of the net_rx_action() ->poll() loop when a device is brought down yet getting hammered with packets.

I'll try to devote some time to this over the weekend, meanwhile just toss this patch, we know it's an issue that all the drivers need to get audited for but we can't fix that until the above paragraph stuff is worked out.

Thanks.

#4 lore raw
In reply to Andrew Gallatin
Quoted 7 lines · Andrew Gallatin

Remove the bogus netif_running() check from myri10ge_poll().

This eliminates any chance that myri10ge_poll() can trigger an oops by calling netif_rx_complete() and returning with work_done == budget.

holding onto this patch but not applying, because NAPI discussions appear to be continuing...