scm: fix scm_fp_list->list initialization made in wrong place

This is the next page of the scm recursion story (the commit
f8d570a4 net: Fix recursive descent in __scm_destroy()).

In function scm_fp_dup(), the INIT_LIST_HEAD(&fpl->list) of newly
created fpl is done *before* the subsequent memcpy from the old
structure and thus the freshly initialized list is overwritten.

But that's OK, since this initialization is not required at all,
since the fpl->list is list_add-ed at the destruction time in any
case (and is unused in other code), so I propose to drop both
initializations, rather than moving it after the memcpy.

Please, correct me if I miss something significant.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by Pavel Emelyanov and committed by David S. Miller 5421ae01 d8c3e23d

-2
-2
net/core/scm.c
··· 75 75 if (!fpl) 76 76 return -ENOMEM; 77 77 *fplp = fpl; 78 - INIT_LIST_HEAD(&fpl->list); 79 78 fpl->count = 0; 80 79 } 81 80 fpp = &fpl->fp[fpl->count]; ··· 300 301 301 302 new_fpl = kmalloc(sizeof(*fpl), GFP_KERNEL); 302 303 if (new_fpl) { 303 - INIT_LIST_HEAD(&new_fpl->list); 304 304 for (i=fpl->count-1; i>=0; i--) 305 305 get_file(fpl->fp[i]); 306 306 memcpy(new_fpl, fpl, sizeof(*fpl));