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]
Date:   Wed, 19 Oct 2022 13:02:07 +0300
From:   Leon Romanovsky <leon@...nel.org>
To:     shaozhengchao <shaozhengchao@...wei.com>
Cc:     netdev@...r.kernel.org, davem@...emloft.net, edumazet@...gle.com,
        kuba@...nel.org, pabeni@...hat.com, keescook@...omium.org,
        gustavoars@...nel.org, gregkh@...uxfoundation.org, ast@...nel.org,
        peter.chen@...nel.org, bin.chen@...igine.com, luobin9@...wei.com,
        weiyongjun1@...wei.com, yuehaibing@...wei.com
Subject: Re: [PATCH net 3/4] net: hinic: fix the issue of CMDQ memory leaks

On Wed, Oct 19, 2022 at 05:37:42PM +0800, shaozhengchao wrote:
> 
> 
> On 2022/10/19 16:39, Leon Romanovsky wrote:
> > On Wed, Oct 19, 2022 at 03:41:06PM +0800, shaozhengchao wrote:
> > > 
> > > 
> > > On 2022/10/19 15:20, Leon Romanovsky wrote:
> > > > On Wed, Oct 19, 2022 at 10:42:19AM +0800, Zhengchao Shao wrote:
> > > > > When hinic_set_cmdq_depth() fails in hinic_init_cmdqs(), the cmdq memory is
> > > > > not released correctly. Fix it.
> > > > > 
> > > > > Fixes: 72ef908bb3ff ("hinic: add three net_device_ops of vf")
> > > > > Signed-off-by: Zhengchao Shao <shaozhengchao@...wei.com>
> > > > > ---
> > > > >    drivers/net/ethernet/huawei/hinic/hinic_hw_cmdq.c | 5 +++++
> > > > >    1 file changed, 5 insertions(+)
> > > > 
> > > > <...>
> > > > 
> > > > > +	cmdq_type = HINIC_CMDQ_SYNC;
> > > > > +	for (; cmdq_type < HINIC_MAX_CMDQ_TYPES; cmdq_type++)
> > > > 
> > > > Why do you have this "for loops" in all places? There is only one cmdq_type.
> > > > 
> > > > Thanks
> > > Hi Leon:
> > > 	Thank you for your review. Now, only the synchronous CMDQ is
> > > enabled for the current CMDQs. New type of CMDQ could be added later.
> > 
> > Single command type was added in 2017, and five years later, new type wasn't added yet.
> > 
> OK, I will modify in V2, and I will do cleanup in another patch.

Thanks

> 
> Thanks
> 
> Zhengchao Shao
> 
> > > So looping style is maintained on both the allocation and release paths.
> > > 
> > > Zhengchao Shao

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ