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: <ef166c83-2fec-47dc-a3e8-215c211be0db@gmx.net>
Date: Wed, 27 Nov 2024 15:47:52 +0100
From: Stefan Wahren <wahrenst@....net>
To: Kryštof Černý <cleverline1mc@...il.com>,
 Krzysztof Kozlowski <krzk@...nel.org>, Rob Herring <robh@...nel.org>,
 Conor Dooley <conor+dt@...nel.org>,
 Stefan Wahren <stefan.wahren@...rgebyte.com>
Cc: Ben Gardner <bgardner@...tec.com>, linux-kernel@...r.kernel.org,
 devicetree@...r.kernel.org
Subject: Re: [PATCH v4 2/3] w1: ds2482: Add regulator support

Hi Kryštof,

Am 27.11.24 um 15:21 schrieb Kryštof Černý:
> I2C_FUNC_SMBUS_WRITE_BYTE_DATA |
>> @@ -457,6 +459,10 @@ static int ds2482_probe(struct i2c_client *client)
>>           goto exit;
>>       }
>>   +    ret = devm_regulator_get_enable(&client->dev, "vcc");
>> +    if (ret)
>> +        return dev_err_probe(&client->dev, ret, "Failed to enable
>> regulator\n");
>
> This will cause a memory leak of `data`, I would refactor the driver a
> bit in the next patch revision. Should I create a separate commit that
> switches from kzalloc() to devm_kzalloc() or keep it in patch 2/3? The
> separate commits way seems correct to me, so it is clearly
> distinguished. Sorry that I missed it.
I'm not the maintainer, but i suggests to send a V5 and add a separate
commit to avoid this issue. The merge window is still open.

Best regards
>
>> +
>>       data->client = client;
>>       i2c_set_clientdata(client, data);
>
> Best regards,
> Kryštof Černý


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ