[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aaff7b8f-5fc3-e811-b334-42d323dfbf2e@axentia.se>
Date: Sat, 26 Aug 2017 08:09:43 +0200
From: Peter Rosin <peda@...ntia.se>
To: Jonathan Cameron <jic23@...nel.org>
Cc: "Gustavo A. R. Silva" <garsilva@...eddedor.com>,
Hartmut Knaack <knaack.h@....de>,
Lars-Peter Clausen <lars@...afoo.de>,
Peter Meerwald-Stadler <pmeerw@...erw.net>,
linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org,
Christophe JAILLET <christophe.jaillet@...adoo.fr>
Subject: Re: [PATCH] iio: multiplexer: add NULL check on devm_kzalloc() and
devm_kmemdup() return values
On 2017-07-09 19:10, Jonathan Cameron wrote:
> On Fri, 7 Jul 2017 11:26:35 +0200
> Peter Rosin <peda@...ntia.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@...ntia.se>
>>>> Signed-off-by: Gustavo A. R. Silva <garsilva@...eddedor.com>
>>>
>>> Either way,
>>>
>>> Reviewed-by: Peter Rosin <peda@...ntia.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...
Cheers,
Peter
[1] https://lkml.org/lkml/2017/8/26/3
Powered by blists - more mailing lists