lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <32c84850-85e8-e063-b104-220afe0554f8@metux.net>
Date:   Mon, 11 Mar 2019 11:09:08 +0100
From:   "Enrico Weigelt, metux IT consult" <lkml@...ux.net>
To:     Jacek Anaszewski <jacek.anaszewski@...il.com>,
        Kangjie Lu <kjlu@....edu>
Cc:     pakki001@....edu, Riku Voipio <riku.voipio@....fi>,
        Pavel Machek <pavel@....cz>, linux-leds@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] leds: fix a potential NULL pointer dereference

On 10.03.19 21:27, Jacek Anaszewski wrote:
> Hi Kangjie,
> 
> Thank you for the patch.
> 
> On 3/9/19 7:04 AM, Kangjie Lu wrote:
>> In case of_match_device cannot find a match, the fixes returns
>> -EINVAL to avoid NULL pointer dereference.
>>
>> Signed-off-by: Kangjie Lu <kjlu@....edu>
>> ---
>>   drivers/leds/leds-pca9532.c | 8 ++++++--
>>   1 file changed, 6 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/leds/leds-pca9532.c b/drivers/leds/leds-pca9532.c
>> index 7fea18b0c15d..4b0335591728 100644
>> --- a/drivers/leds/leds-pca9532.c
>> +++ b/drivers/leds/leds-pca9532.c
>> @@ -513,6 +513,7 @@ static int pca9532_probe(struct i2c_client *client,
>>       const struct i2c_device_id *id)
>>   {
>>       int devid;
>> +    const struct of_device_id *of_id;

Looks like an indention mismatch that might call for the
Great White Handkerchief ;-)


--mtx

-- 
Enrico Weigelt, metux IT consult
Free software and Linux embedded engineering
info@...ux.net -- +49-151-27565287

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ