Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1725648
| Path | csiph.com!news.redatomik.org!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Jonathan Cameron <jic23@kernel.org> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] iio: multiplexer: add NULL check on devm_kzalloc() and devm_kmemdup() return values |
| Date | Sun, 03 Sep 2017 14:20:01 +0200 |
| Message-ID | <ulC2B-8hl-3@gated-at.bofh.it> (permalink) |
| References | <u0twZ-7l9-3@gated-at.bofh.it> <u1o2d-265-3@gated-at.bofh.it> <u1o2d-265-5@gated-at.bofh.it> <u1o2d-265-1@gated-at.bofh.it> <ulC2B-8hl-5@gated-at.bofh.it> |
| Dmarc-Filter | OpenDMARC Filter v1.3.2 mail.kernel.org 3705921AF8 |
| Authentication-Results | mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org |
| Authentication-Results | mail.kernel.org; spf=none smtp.mailfrom=jic23@kernel.org |
| X-Mailer | Claws Mail 3.15.1-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu) |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=US-ASCII |
| Content-Transfer-Encoding | 7bit |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 68 |
| Organization | linux.* mail to news gateway |
| X-Original-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> |
| X-Original-Date | Sun, 3 Sep 2017 13:13:28 +0100 |
| X-Original-Message-ID | <20170903131328.78a5d08a@archlinux> |
| X-Original-References | <20170707045311.GA4535@embeddedgus> <df6ae9c6-8ac7-368b-a1c2-4403387df02b@axentia.se> <0ba9b76f-41f8-3171-2eb7-d9abbe106674@axentia.se> <20170709181023.54458b6c@kernel.org> <aaff7b8f-5fc3-e811-b334-42d323dfbf2e@axentia.se> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1725648 |
Show key headers only | View raw
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
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
Re: [PATCH] iio: multiplexer: add NULL check on devm_kzalloc() and devm_kmemdup() return values Jonathan Cameron <jic23@kernel.org> - 2017-09-03 14:20 +0200
csiph-web