From: yuan linyu <cugyly@163•com>
To: David Miller <davem@davemloft•net>
Cc: netdev@vger•kernel.org, Linyu.Yuan@alcatel-sbell•com.cn
Subject: Re: [PATCH] net: remove member 'max' of struct scm_fp_list
Date: Sat, 11 Feb 2017 10:04:22 +0800 [thread overview]
Message-ID: <1486778662.2554.2.camel@163.com> (raw)
In-Reply-To: <20170210.102543.2139355880844380775.davem@davemloft.net>
On 五, 2017-02-10 at 10:25 -0500, David Miller wrote:
> From: yuan linyu <cugyly@163•com>
> Date: Fri, 10 Feb 2017 20:11:13 +0800
>
> > From: yuan linyu <Linyu.Yuan@alcatel-sbell•com.cn>
> >
> > SCM_MAX_FD can fully replace it.
> >
> > Signed-off-by: yuan linyu <Linyu.Yuan@alcatel-sbell•com.cn>
>
> I don't think so:
>
> > @@ -341,7 +332,6 @@ struct scm_fp_list *scm_fp_dup(struct scm_fp_list *fpl)
> > if (new_fpl) {
> > for (i = 0; i < fpl->count; i++)
> > get_file(fpl->fp[i]);
> > - new_fpl->max = new_fpl->count;
> > new_fpl->user = get_uid(fpl->user);
>
> It's not set the SCM_MAX_FD here, it's set to whatever fpl->count is.
>
> In other words, your patch breaks things.
maybe it's not good to "SCM_MAX_FD can fully replace it".
actually 'max' field is useless.'count' field is enough.
prev parent reply other threads:[~2017-02-11 2:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-10 12:11 [PATCH] net: remove member 'max' of struct scm_fp_list yuan linyu
2017-02-10 15:25 ` David Miller
2017-02-11 2:04 ` yuan linyu [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=1486778662.2554.2.camel@163.com \
--to=cugyly@163$(echo .)com \
--cc=Linyu.Yuan@alcatel-sbell$(echo .)com.cn \
--cc=davem@davemloft$(echo .)net \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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