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: <93b003ea4b80e0b6ec3eb63288e028eb@walle.cc>
Date:   Thu, 05 Nov 2020 08:50:59 +0100
From:   Michael Walle <michael@...le.cc>
To:     Stephen Boyd <sboyd@...nel.org>
Cc:     linux-clk@...r.kernel.org, linux-kernel@...r.kernel.org,
        Michael Turquette <mturquette@...libre.com>
Subject: Re: [PATCH] clk: fsl-sai: fix memory leak

Am 2020-11-05 01:29, schrieb Stephen Boyd:
> Quoting Michael Walle (2020-11-01 10:48:18)
>> diff --git a/drivers/clk/clk-fsl-sai.c b/drivers/clk/clk-fsl-sai.c
>> index 0221180a4dd7..1e81c8d8a6fd 100644
>> --- a/drivers/clk/clk-fsl-sai.c
>> +++ b/drivers/clk/clk-fsl-sai.c
>> @@ -68,9 +68,20 @@ static int fsl_sai_clk_probe(struct platform_device 
>> *pdev)
>>         if (IS_ERR(hw))
>>                 return PTR_ERR(hw);
>> 
>> +       platform_set_drvdata(pdev, hw);
>> +
>>         return devm_of_clk_add_hw_provider(dev, of_clk_hw_simple_get, 
>> hw);
>>  }
>> 
>> +static int fsl_sai_clk_remove(struct platform_device *pdev)
>> +{
>> +       struct clk_hw *hw = platform_get_drvdata(pdev);
>> +
>> +       clk_hw_unregister_composite(hw);
> 
> Should we add a devm_clk_hw_register_composite() API and use it here?
> That way we don't need a remove function and devm can be used
> throughout.

Can do. But does adding a devm_ function qualify for the -stable branch?
Or should I expect to have exactly this patch as a backport there then?

-michael

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ