• Nicolas Dichtel's avatar
    caif: remove wrong dev_net_set() call · e41d162f
    Nicolas Dichtel authored
    commit 8997c27e upstream.
    
    src_net points to the netns where the netlink message has been received. This
    netns may be different from the netns where the interface is created (because
    the user may add IFLA_NET_NS_[PID|FD]). In this case, src_net is the link netns.
    
    It seems wrong to override the netns in the newlink() handler because if it
    was not already src_net, it means that the user explicitly asks to create the
    netdevice in another netns.
    
    CC: Sjur Brændeland <sjur.brandeland@stericsson.com>
    CC: Dmitry Tarnyagin <dmitry.tarnyagin@lockless.no>
    Fixes: 8391c4aa ("caif: Bugfixes in CAIF netdevice for close and flow control")
    Fixes: c4125400 ("caif-hsi: Add rtnl support")
    Signed-off-by: default avatarNicolas Dichtel <nicolas.dichtel@6wind.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    [lizf: Backported to 3.4: drop the change to drivers/net/caif/caif_hsi.c]
    Signed-off-by: default avatarZefan Li <lizefan@huawei.com>
    e41d162f
chnl_net.c 13 KB