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] [day] [month] [year] [list]
Message-ID: <e368c522-33f2-4651-9f21-e00a37201553@linaro.org>
Date: Thu, 1 May 2025 17:17:57 +0200
From: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To: Lee Jones <lee@...nel.org>
Cc: Karel Balej <balejk@...fyz.cz>, Chanwoo Choi <cw00.choi@...sung.com>,
 Krzysztof Kozlowski <krzk@...nel.org>, Orson Zhai <orsonzhai@...il.com>,
 Baolin Wang <baolin.wang@...ux.alibaba.com>,
 Chunyan Zhang <zhang.lyra@...il.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 6/8] mfd: max8925: Fix wakeup source leaks on device
 unbind

On 15/04/2025 17:48, Lee Jones wrote:
> On Sun, 06 Apr 2025, Krzysztof Kozlowski wrote:
> 
>> Device can be unbound, so driver must also release memory for the wakeup
>> source.
>>
>> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
>> ---
>>  drivers/mfd/max8925-i2c.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/mfd/max8925-i2c.c b/drivers/mfd/max8925-i2c.c
>> index 556aea7ec0a0473edc9291cae0c82fe9b4ecb346..ab19ff0c786732be53e58a0162d2658650d88f47 100644
>> --- a/drivers/mfd/max8925-i2c.c
>> +++ b/drivers/mfd/max8925-i2c.c
>> @@ -201,6 +201,7 @@ static void max8925_remove(struct i2c_client *client)
>>  	struct max8925_chip *chip = i2c_get_clientdata(client);
>>  
>>  	max8925_device_exit(chip);
>> +	device_init_wakeup(&client->dev, false);
> 
> Why not devm_* instead?


Hi Lee,

I am sorry I reply so late - I totally missed your comment/email.

I am not using devm intentionally, because there is cleanup path and
devm() would change the order of things are released.

The rule of thumb is: use devm or manual, don't mix, otherwise you ask
for trouble in weird cases.

Same for the other comment.

Best regards,
Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ