• Pavel Emelyanov's avatar
    scm: fix scm_fp_list->list initialization made in wrong place · 5421ae01
    Pavel Emelyanov authored
    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: default avatarPavel Emelyanov <xemul@openvz.org>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    5421ae01
scm.c 6.93 KB