From: Leon Romanovsky <leon@kernel.org>
To: shaozhengchao <shaozhengchao@huawei.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, edumazet@google.com,
kuba@kernel.org, pabeni@redhat.com, keescook@chromium.org,
gustavoars@kernel.org, gregkh@linuxfoundation.org,
ast@kernel.org, peter.chen@kernel.org, bin.chen@corigine.com,
luobin9@huawei.com, weiyongjun1@huawei.com,
yuehaibing@huawei.com
Subject: Re: [PATCH net 3/4] net: hinic: fix the issue of CMDQ memory leaks
Date: Wed, 19 Oct 2022 11:39:09 +0300 [thread overview]
Message-ID: <Y0+3rd/tmB289uPX@unreal> (raw)
In-Reply-To: <8d79818c-21a3-9a78-7b80-15f5c60875a4@huawei.com>
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@huawei.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.
> So looping style is maintained on both the allocation and release paths.
>
> Zhengchao Shao
next prev parent reply other threads:[~2022-10-19 8:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-19 2:42 [PATCH net 0/4] fix some issues in Huawei hinic driver Zhengchao Shao
2022-10-19 2:42 ` [PATCH net 1/4] net: hinic: fix incorrect assignment issue in hinic_set_interrupt_cfg() Zhengchao Shao
2022-10-19 2:42 ` [PATCH net 2/4] net: hinic: fix memory leak when reading function table Zhengchao Shao
2022-10-19 2:42 ` [PATCH net 3/4] net: hinic: fix the issue of CMDQ memory leaks Zhengchao Shao
2022-10-19 7:20 ` Leon Romanovsky
2022-10-19 7:41 ` shaozhengchao
2022-10-19 8:39 ` Leon Romanovsky [this message]
2022-10-19 9:37 ` shaozhengchao
2022-10-19 10:02 ` Leon Romanovsky
2022-10-19 2:42 ` [PATCH net 4/4] net: hinic: fix the issue of double release MBOX callback of VF Zhengchao Shao
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Y0+3rd/tmB289uPX@unreal \
--to=leon@kernel.org \
--cc=ast@kernel.org \
--cc=bin.chen@corigine.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gregkh@linuxfoundation.org \
--cc=gustavoars@kernel.org \
--cc=keescook@chromium.org \
--cc=kuba@kernel.org \
--cc=luobin9@huawei.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=peter.chen@kernel.org \
--cc=shaozhengchao@huawei.com \
--cc=weiyongjun1@huawei.com \
--cc=yuehaibing@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).