linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][NETDEV]: remove netif_running() check from myri10ge_poll()
@ 2007-12-12 18:38 Andrew Gallatin
  2007-12-12 19:02 ` David Miller
  2007-12-17 23:19 ` Jeff Garzik
  0 siblings, 2 replies; 5+ messages in thread
From: Andrew Gallatin @ 2007-12-12 18:38 UTC (permalink / raw)
  To: David Miller; +Cc: Jeff Garzik, netdev, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 253 bytes --]

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.

Signed-off-by: Andrew Gallatin <gallatin@myri.com>

[-- Attachment #2: myri10ge_remove_netif_running.diff --]
[-- Type: text/plain, Size: 515 bytes --]

diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c
index 8def865..c90958f 100644
--- a/drivers/net/myri10ge/myri10ge.c
+++ b/drivers/net/myri10ge/myri10ge.c
@@ -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);
 	}

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH][NETDEV]: remove netif_running() check from myri10ge_poll()
  2007-12-12 18:38 [PATCH][NETDEV]: remove netif_running() check from myri10ge_poll() Andrew Gallatin
@ 2007-12-12 19:02 ` David Miller
  2007-12-21  0:05   ` Andrew Morton
  2007-12-17 23:19 ` Jeff Garzik
  1 sibling, 1 reply; 5+ messages in thread
From: David Miller @ 2007-12-12 19:02 UTC (permalink / raw)
  To: gallatin; +Cc: jeff, netdev, linux-kernel

From: Andrew Gallatin <gallatin@myri.com>
Date: Wed, 12 Dec 2007 13:38:34 -0500

> 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.
> 
> Signed-off-by: Andrew Gallatin <gallatin@myri.com>

Acked-by: David S. Miller <davem@davemloft.net>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH][NETDEV]: remove netif_running() check from myri10ge_poll()
  2007-12-12 18:38 [PATCH][NETDEV]: remove netif_running() check from myri10ge_poll() Andrew Gallatin
  2007-12-12 19:02 ` David Miller
@ 2007-12-17 23:19 ` Jeff Garzik
  1 sibling, 0 replies; 5+ messages in thread
From: Jeff Garzik @ 2007-12-17 23:19 UTC (permalink / raw)
  To: Andrew Gallatin; +Cc: David Miller, netdev, linux-kernel

Andrew Gallatin wrote:
> 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.
> 
> Signed-off-by: Andrew Gallatin <gallatin@myri.com>

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



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH][NETDEV]: remove netif_running() check from myri10ge_poll()
  2007-12-12 19:02 ` David Miller
@ 2007-12-21  0:05   ` Andrew Morton
  2007-12-21  0:37     ` David Miller
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Morton @ 2007-12-21  0:05 UTC (permalink / raw)
  To: David Miller; +Cc: gallatin, jeff, netdev, linux-kernel

On Wed, 12 Dec 2007 11:02:43 -0800 (PST)
David Miller <davem@davemloft.net> wrote:

> From: Andrew Gallatin <gallatin@myri.com>
> Date: Wed, 12 Dec 2007 13:38:34 -0500
> 
> > 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.
> > 
> > Signed-off-by: Andrew Gallatin <gallatin@myri.com>
> 
> Acked-by: David S. Miller <davem@davemloft.net>

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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH][NETDEV]: remove netif_running() check from myri10ge_poll()
  2007-12-21  0:05   ` Andrew Morton
@ 2007-12-21  0:37     ` David Miller
  0 siblings, 0 replies; 5+ messages in thread
From: David Miller @ 2007-12-21  0:37 UTC (permalink / raw)
  To: akpm; +Cc: gallatin, jeff, netdev, linux-kernel

From: Andrew Morton <akpm@linux-foundation.org>
Date: Thu, 20 Dec 2007 16:05:18 -0800

> On Wed, 12 Dec 2007 11:02:43 -0800 (PST)
> David Miller <davem@davemloft.net> wrote:
> 
> > From: Andrew Gallatin <gallatin@myri.com>
> > Date: Wed, 12 Dec 2007 13:38:34 -0500
> > 
> > > 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.
> > > 
> > > Signed-off-by: Andrew Gallatin <gallatin@myri.com>
> > 
> > Acked-by: David S. Miller <davem@davemloft.net>
> 
> 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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-12-21  0:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-12-12 18:38 [PATCH][NETDEV]: remove netif_running() check from myri10ge_poll() Andrew Gallatin
2007-12-12 19:02 ` David Miller
2007-12-21  0:05   ` Andrew Morton
2007-12-21  0:37     ` David Miller
2007-12-17 23:19 ` Jeff Garzik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).