All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Bob Copeland" <me@bobcopeland.com>
To: Hugh Dickins <hugh@veritas.com>
Cc: ath5k-devel@venema.h4ckr.net, linux-wireless@vger.kernel.org,
	Jiri Slaby <jirislaby@gmail.com>,
	maximlevitsky@gmail.com
Subject: Re: [ath5k-devel] ath5k_tasklet_rx BUG_ON(bf->skb == NULL)
Date: Tue, 13 Jan 2009 10:56:37 -0500	[thread overview]
Message-ID: <20090113154204.M52697@bobcopeland.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0901131509080.9571@blonde.anvils>

On Tue, 13 Jan 2009 15:35:29 +0000 (GMT), Hugh Dickins wrote
> But I haven't seen any allocation failure for several days.
> I didn't get any while trying to simplify the reproduction,

Ok, well here's how I reproduced it manually.  Without the patch, you 
should see "can't alloc skbuff of size ...." followed shortly by the 
BUG.  With the patch, you see the same error but things proceed as 
normal.

(I chose 60 because anything < 40 will fail in probe).

I'll go ahead and push this upstream then today or tomorrow; let me 
know if you run into any problems with more testing.

> > +static
> > +struct sk_buff *ath5k_rx_skb_alloc(struct ath5k_softc *sc, dma_addr_t
*skb_addr)
> > +{
> > +	struct sk_buff *skb;
> > +	unsigned int off;

+    static int foo = 0; 

> > +	/*
> > +	 * Allocate buffer with headroom_needed space for the
> > +	 * fake physical layer header at the start.
> > +	 */
> > +	skb = dev_alloc_skb(sc->rxbufsize + sc->cachelsz - 1);

+    if (++foo == 60)
+        skb = NULL;

> > +
> > +	if (!skb) {
> > +		ATH5K_ERR(sc, "can't alloc skbuff of size %u\n",
> > +				sc->rxbufsize + sc->cachelsz - 1);
> > +		return NULL;
> > +	}


> > Changes-licensed-under: 3-Clause-BSD
> 
> Hmm, I haven't noticed anyone doing that before: hope you're not
> starting a trend!  I think you'll find (Documentation/SubmittingPatches)
> that your Signed-off-by agrees to the Developer's Certificate of Origin
> 1.1, which would put your patch under the same open source licence(s) as
> drivers/net/wireless/ath5k/base.c already contains - that's the usual
> case.

I agree with all of the above, but the SFLC suggests we do it anyway.

http://kerneltrap.org/Linux/Wireless_Project_Suggests_Changes-licensed-under_Tag

-- 
Bob Copeland %% www.bobcopeland.com



  reply	other threads:[~2009-01-13 15:56 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-08 13:49 ath5k_tasklet_rx BUG_ON(bf->skb == NULL) Hugh Dickins
2009-01-08 14:46 ` [ath5k-devel] " Maxim Levitsky
2009-01-08 16:18   ` Hugh Dickins
2009-01-08 17:10     ` Bob Copeland
2009-01-08 17:55       ` Hugh Dickins
2009-01-08 18:41         ` Bob Copeland
2009-01-09 13:41           ` Bob Copeland
2009-01-09 14:10             ` Hugh Dickins
2009-01-10 16:47               ` Bob Copeland
2009-01-10 20:15                 ` Bob Copeland
2009-01-13 15:35                   ` Hugh Dickins
2009-01-13 15:56                     ` Bob Copeland [this message]
2009-01-13 16:40                       ` Hugh Dickins
2009-01-13 17:45                         ` Luis R. Rodriguez
2009-02-06 13:12                       ` Hugh Dickins
2009-02-06 18:37                         ` Bob Copeland
2009-02-06 18:44                           ` John W. Linville
2009-02-06 19:01                             ` Hugh Dickins
2009-02-06 20:58                               ` Bob Copeland
2009-02-09  2:30                             ` Bob Copeland

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=20090113154204.M52697@bobcopeland.com \
    --to=me@bobcopeland.com \
    --cc=ath5k-devel@venema.h4ckr.net \
    --cc=hugh@veritas.com \
    --cc=jirislaby@gmail.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=maximlevitsky@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.