From: David Miller <davem@davemloft.net>
To: jj@chaosbits.net
Cc: linux-kernel@vger.kernel.org, chas@cmf.nrl.navy.mil,
linux-atm-general@lists.sourceforge.net, netdev@vger.kernel.org,
nathan@traverse.com.au, dwmw2@infradead.org, treker@xrio.com
Subject: Re: [PATCH] ATM, Solos PCI ADSL2+: Don't deref NULL pointer if net_ratelimit() and alloc_skb() interact badly.
Date: Sun, 13 Feb 2011 16:55:54 -0800 (PST) [thread overview]
Message-ID: <20110213.165554.173868884.davem@davemloft.net> (raw)
In-Reply-To: <alpine.LNX.2.00.1102132142460.18930@swampdragon.chaosbits.net>
From: Jesper Juhl <jj@chaosbits.net>
Date: Sun, 13 Feb 2011 21:49:32 +0100 (CET)
> If alloc_skb() fails to allocate memory and returns NULL then we want to
> return -ENOMEM from drivers/atm/solos-pci.c::popen() regardless of the
> value of net_ratelimit(). The way the code is today, we may not return if
> net_ratelimit() returns 0, then we'll proceed to pass a NULL pointer to
> skb_put() which will blow up in our face.
> This patch ensures that we always return -ENOMEM on alloc_skb() failure
> and only let the dev_warn() be controlled by the value of net_ratelimit().
>
> Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Applied.
prev parent reply other threads:[~2011-02-14 0:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-13 20:49 [PATCH] ATM, Solos PCI ADSL2+: Don't deref NULL pointer if net_ratelimit() and alloc_skb() interact badly Jesper Juhl
2011-02-14 0:55 ` David Miller [this message]
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=20110213.165554.173868884.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=chas@cmf.nrl.navy.mil \
--cc=dwmw2@infradead.org \
--cc=jj@chaosbits.net \
--cc=linux-atm-general@lists.sourceforge.net \
--cc=linux-kernel@vger.kernel.org \
--cc=nathan@traverse.com.au \
--cc=netdev@vger.kernel.org \
--cc=treker@xrio.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox