lvs-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "wanghai (M)" <wanghai38@huawei.com>
To: Julian Anastasov <ja@ssi.bg>
Cc: Simon Horman <horms@verge.net.au>,
	pablo@netfilter.org, christian@brauner.io,
	lvs-devel@vger.kernel.org, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH net v2] ipvs: fix possible memory leak in ip_vs_control_net_init
Date: Tue, 24 Nov 2020 16:07:00 +0800	[thread overview]
Message-ID: <506b722c-e049-eab1-3f19-f30473467fff@huawei.com> (raw)
In-Reply-To: <9c409f4a-42df-1dd8-e69a-d5d3bab8d0c0@ssi.bg>


在 2020/11/24 3:04, Julian Anastasov 写道:
> 	Hello,
>
> On Mon, 23 Nov 2020, wanghai (M) wrote:
>
>> 在 2020/11/22 19:20, Julian Anastasov 写道:
>>>   Hello,
>>>
>>> On Fri, 20 Nov 2020, Wang Hai wrote:
>>>
>>>> +	if (!proc_create_net_single("ip_vs_stats_percpu", 0,
>>>> ipvs->net->proc_net,
>>>> +			ip_vs_stats_percpu_show, NULL))
>>>> +		goto err_percpu;
>>> 	Make sure the parameters are properly aligned to function open
>>> parenthesis without exceeding 80 columns:
>>>
>>> linux# scripts/checkpatch.pl --strict /tmp/file.patch
>> Thanks, I'll perfect it.
>>> 	It was true only for first call due to some
>>> renames for the others two in commit 3617d9496cd9 :(
>> It does indeed rename in commit 3617d9496cd9.
>> But I don't understand what's wrong with my patch here.
> 	Visually, they should look like this:
>
>          if (!proc_create_net("ip_vs", 0, ipvs->net->proc_net,
>                               &ip_vs_info_seq_ops, sizeof(struct ip_vs_iter)))
>                  goto err_vs;
>          if (!proc_create_net_single("ip_vs_stats", 0, ipvs->net->proc_net,
>                                      ip_vs_stats_show, NULL))
>                  goto err_stats;
>          if (!proc_create_net_single("ip_vs_stats_percpu", 0,
>                                      ipvs->net->proc_net,
>                                      ip_vs_stats_percpu_show, NULL))
>                  goto err_percpu;

Thank you for your patient explanation, I got it.

I just sent v3

"[PATCH net v3] ipvs: fix possible memory leak in ip_vs_control_net_init"

> 	The first one explained:
>
> <1  TAB>if (!proc_create_net("ip_vs", 0, ipvs->net->proc_net,
> <  open parenthesis is here  ^ and all next lines align to first parameter>
> <1  TAB><1  TAB><1 TAB><5 SP>&ip_vs_info_seq_ops, sizeof(struct ip_vs_iter)))
> <1  TAB><1  TAB>goto err_vs;
>
> Regards
>
> --
> Julian Anastasov <ja@ssi.bg>

      reply	other threads:[~2020-11-24  8:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-20  8:26 [PATCH net v2] ipvs: fix possible memory leak in ip_vs_control_net_init Wang Hai
2020-11-22 11:20 ` Julian Anastasov
2020-11-23 14:49   ` wanghai (M)
2020-11-23 19:04     ` Julian Anastasov
2020-11-24  8:07       ` wanghai (M) [this message]

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=506b722c-e049-eab1-3f19-f30473467fff@huawei.com \
    --to=wanghai38@huawei.com \
    --cc=christian@brauner.io \
    --cc=horms@verge.net.au \
    --cc=ja@ssi.bg \
    --cc=lvs-devel@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).