From: Jonathan Cameron <jic23@kernel.org>
To: Peter Rosin <peda@axentia.se>
Cc: "Gustavo A. R. Silva" <garsilva@embeddedor.com>,
Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Subject: Re: [PATCH] iio: multiplexer: add NULL check on devm_kzalloc() and devm_kmemdup() return values
Date: Sun, 3 Sep 2017 13:13:28 +0100 [thread overview]
Message-ID: <20170903131328.78a5d08a@archlinux> (raw)
In-Reply-To: <aaff7b8f-5fc3-e811-b334-42d323dfbf2e@axentia.se>
On Sat, 26 Aug 2017 08:09:43 +0200
Peter Rosin <peda@axentia.se> wrote:
> On 2017-07-09 19:10, Jonathan Cameron wrote:
> > On Fri, 7 Jul 2017 11:26:35 +0200
> > Peter Rosin <peda@axentia.se> wrote:
> >
> >> On 2017-07-07 06:57, Peter Rosin wrote:
> >>> On 2017-07-07 06:53, Gustavo A. R. Silva wrote:
> >>>> Check return values from call to devm_kzalloc() and devm_kmemup()
> >>>
> >>> If someone cares enough: s/devm_kmemup/evm_kmemdup/
> >>
> >> Strange, there seems to be some inherent shortage of 'd' characters...
> >>
> >> Cheers,
> >> pea :-)
> >>
> >>>
> >>>> in order to prevent a NULL pointer dereference.
> >>>>
> >>>> This issue was detected using Coccinelle and the following semantic patch:
> >>>>
> >>>> @@
> >>>> expression x;
> >>>> identifier fld;
> >>>> @@
> >>>>
> >>>> * x = devm_kzalloc(...);
> >>>> ... when != x == NULL
> >>>> x->fld
> >>>>
> >>>> Cc: Peter Rosin <peda@axentia.se>
> >>>> Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
> >>>
> >>> Either way,
> >>>
> >>> Reviewed-by: Peter Rosin <peda@axentia.se>
> >>>
> >>> Thanks!
> >>>
> > The relevant patch adding the file in questions hasn't yet worked it's
> > way back to the iio tree so I can't apply this until it does.
> >
> > That is likely to be a few weeks away yet. Please give me a poke if
> > I seem to have forgotten it!
>
> Hi Jonathan!
>
> I saw a patch from Christophe JAILLET [1] and it seemed familiar so I
> did a bit of digging. Now, I did go back and check this a couple of
> weeks after you request, but iio-mux.c still wasn't in the iio tree,
> and then I did forgot about it. Sorry. But here's the poke...
>
Applied. Thanks - this one had completely dropped off the back of my
patch queue. Oops.
Jonathan
> Cheers,
> Peter
>
> [1] https://lkml.org/lkml/2017/8/26/3
> --
> To unsubscribe from this list: send the line "unsubscribe linux-iio" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2017-09-03 12:13 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-06 22:08 [PATCH] iio: multiplexer: add NULL check on devm_kzalloc() return value Gustavo A. R. Silva
2017-07-07 4:07 ` Peter Rosin
2017-07-07 4:35 ` Gustavo A. R. Silva
2017-07-07 4:46 ` Peter Rosin
2017-07-07 4:51 ` Gustavo A. R. Silva
2017-07-07 4:53 ` [PATCH] iio: multiplexer: add NULL check on devm_kzalloc() and devm_kmemdup() return values Gustavo A. R. Silva
2017-07-07 4:57 ` Peter Rosin
2017-07-07 9:26 ` Peter Rosin
2017-07-09 17:10 ` Jonathan Cameron
2017-07-10 19:44 ` Gustavo A. R. Silva
2017-08-26 6:09 ` Peter Rosin
2017-09-03 12:13 ` Jonathan Cameron [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=20170903131328.78a5d08a@archlinux \
--to=jic23@kernel.org \
--cc=christophe.jaillet@wanadoo.fr \
--cc=garsilva@embeddedor.com \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peda@axentia.se \
--cc=pmeerw@pmeerw.net \
/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.