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]
Date:   Mon, 12 Dec 2022 11:20:56 +0200
From:   Roger Quadros <rogerq@...nel.org>
To:     Saeed Mahameed <saeed@...nel.org>
Cc:     davem@...emloft.net, maciej.fijalkowski@...el.com, kuba@...nel.org,
        andrew@...n.ch, edumazet@...gle.com, pabeni@...hat.com,
        vigneshr@...com, s-vadapalli@...com, linux-omap@...r.kernel.org,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next] net: ethernet: ti: am65-cpsw: Fix PM runtime
 leakage in am65_cpsw_nuss_ndo_slave_open()



On 10/12/2022 02:54, Saeed Mahameed wrote:
> On 08 Dec 12:55, Roger Quadros wrote:
>> Ensure pm_runtime_put() is issued in error path.
>>
>> Reported-by: Jakub Kicinski <kuba@...nel.org>
>> Signed-off-by: Roger Quadros <rogerq@...nel.org>
> 
> 
> Reviewed-by: Saeed Mahameed <saeed@...nel.org>
> 
> 
> [...]
> 
>> @@ -622,6 +623,10 @@ static int am65_cpsw_nuss_ndo_slave_open(struct net_device *ndev)
>> error_cleanup:
>>     am65_cpsw_nuss_ndo_slave_stop(ndev);
> 
> BTW, while looking at the ndo_slave_stop() call, it seems to abort if am65_cpsw_nuss_common_stop() fails, but looking deeper at that and it seems am65_cpsw_nuss_common_stop() can never fail, so you might want to fix that.

You mean we should change it to return void and get rid of error checks on that function. Right?

> 
>>     return ret;
>> +
>> +runtime_put:
>> +    pm_runtime_put(common->dev);
>> +    return ret;
>> }
>>
>> static void am65_cpsw_nuss_rx_cleanup(void *data, dma_addr_t desc_dma)
>> -- 
>> 2.34.1
>>

cheers,
-roger

Powered by blists - more mailing lists