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: <7a64d717-250c-80e5-3384-835a2c72b4bb@huawei.com>
Date:   Wed, 19 Oct 2022 17:37:42 +0800
From:   shaozhengchao <shaozhengchao@...wei.com>
To:     Leon Romanovsky <leon@...nel.org>
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 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

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