mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: liberty@extricom.com
Cc: linux-kernel@vger.kernel.org, galak@kernel.crashing.org
Subject: Re: [PATCH] gainfar.c : skb_over_panic (kernel-2.6.32.15)
Date: Thu, 24 Jun 2010 14:52:25 -0700 (PDT)	[thread overview]
Message-ID: <20100624.145225.70206491.davem@davemloft.net> (raw)
In-Reply-To: <4C232B13.5000706@extricom.com>

From: Eran Liberty <liberty@extricom.com>
Date: Thu, 24 Jun 2010 12:53:23 +0300

> Fix possible skb_over_panic event in Freescale's "gianfar" driver. 
> 
> The skb_over_panic occurs due to calling skb_put() within
> gfar_clean_rx_ring(). This happens if (and only if) shortly prior to
> the event and a few lined above the skb_put(), an skb was queued back
> to the priv->rx_recycle queue due to RXBD_LAST or RXBD_ERR status.
> The skb is queued without properly re-setting its state.
> 
> The patch properly reset the skb state.
> 
> I have tested this patch on MPC8548 based product and asserted it
> avoided the skb_over_panic event.
> 
> Signed-off-by: Eran Liberty <liberty@extricom.com>

Eran, this seems to be fixed already.  The code in the current
tree now reads:

				/*
				 * We need to un-reserve() the skb to what it
				 * was before gfar_new_skb() re-aligned
				 * it to an RXBUF_ALIGNMENT boundary
				 * before we put the skb back on the
				 * recycle list.
				 */
				skb_reserve(skb, -GFAR_CB(skb)->alignamount);
				__skb_queue_head(&priv->rx_recycle, skb);

  reply	other threads:[~2010-06-24 21:52 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-24  9:53 Eran Liberty
2010-06-24 21:52 ` David Miller [this message]
2010-06-28  7:57   ` Eran Liberty
2010-06-28 18:33     ` David Miller
2010-06-29 15:42       ` Eran Liberty
2010-06-29 16:20         ` [PATCH] gainfar.c : code cleanup Eran Liberty
2010-09-29  0:35         ` [PATCH] gainfar.c : skb_over_panic (kernel-2.6.32.15) emin ak
2010-10-03  9:32           ` Eran Liberty
2010-10-03 10:54             ` emin ak
2010-10-03 14:48               ` Eran Liberty

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100624.145225.70206491.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=galak@kernel.crashing.org \
    --cc=liberty@extricom.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome