From: Stefan Schmidt <stefan@datenfreihafen.org>
To: Kangjie Lu <kjlu@umn.edu>
Cc: pakki001@umn.edu,
Michael Hennerich <michael.hennerich@analog.com>,
Alexander Aring <alex.aring@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
linux-wpan@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] net: ieee802154: fix a potential NULL pointer dereference
Date: Wed, 13 Mar 2019 10:09:34 +0100 [thread overview]
Message-ID: <3e612944-e54c-a694-405e-f73582a690c5@datenfreihafen.org> (raw)
In-Reply-To: <20190311072517.29740-1-kjlu@umn.edu>
Hello.
[please ignore the first mail, hit send to early]
On 11.03.19 08:25, Kangjie Lu wrote:
> In case alloc_ordered_workqueue fails, the fix releases
> sources and returns -ENOMEM to avoid NULL pointer dereference.
>
> Signed-off-by: Kangjie Lu <kjlu@umn.edu>
> ---
> drivers/net/ieee802154/adf7242.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/drivers/net/ieee802154/adf7242.c b/drivers/net/ieee802154/adf7242.c
> index cd1d8faccca5..cd6b95e673a5 100644
> --- a/drivers/net/ieee802154/adf7242.c
> +++ b/drivers/net/ieee802154/adf7242.c
> @@ -1268,6 +1268,10 @@ static int adf7242_probe(struct spi_device *spi)
> INIT_DELAYED_WORK(&lp->work, adf7242_rx_cal_work);
> lp->wqueue = alloc_ordered_workqueue(dev_name(&spi->dev),
> WQ_MEM_RECLAIM);
> + if (unlikely(!lp->wqueue)) {
> + ret = -ENOMEM;
> + goto err_hw_init;
> + }
>
> ret = adf7242_hw_init(lp);
> if (ret)
>
This patch has been applied to the wpan tree and will be
part of the next pull request to net. Thanks!
regards
Stefan Schmidt
prev parent reply other threads:[~2019-03-13 9:09 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-03-11 7:25 [PATCH] net: ieee802154: fix a potential NULL pointer dereference Kangjie Lu
2019-03-11 7:30 ` Hennerich, Michael
2019-03-13 9:08 ` Stefan Schmidt
2019-03-13 9:09 ` Stefan Schmidt
2019-03-13 9:09 ` Stefan Schmidt [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=3e612944-e54c-a694-405e-f73582a690c5@datenfreihafen.org \
--to=stefan@datenfreihafen.org \
--cc=alex.aring@gmail.com \
--cc=davem@davemloft.net \
--cc=kjlu@umn.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-wpan@vger.kernel.org \
--cc=michael.hennerich@analog.com \
--cc=netdev@vger.kernel.org \
--cc=pakki001@umn.edu \
/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;
as well as URLs for NNTP newsgroup(s).