On 五, 2017-02-10 at 10:25 -0500, David Miller wrote:
> From: yuan linyu <cug...@163.com>
> Date: Fri, 10 Feb 2017 20:11:13 +0800
> 
> > From: yuan linyu <linyu.y...@alcatel-sbell.com.cn>
> > 
> > SCM_MAX_FD can fully replace it.
> > 
> > Signed-off-by: yuan linyu <linyu.y...@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.
 

Reply via email to