On Fri, Apr 02, 2021 at 12:36:22AM -0700, Andrei Vagin wrote: > diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c > index 1bdcb33fb561..9508d3a0a28f 100644 > --- a/net/core/rtnetlink.c > +++ b/net/core/rtnetlink.c > @@ -2603,14 +2603,20 @@ static int do_setlink(const struct sk_buff *skb, > return err; > > if (tb[IFLA_NET_NS_PID] || tb[IFLA_NET_NS_FD] || > tb[IFLA_TARGET_NETNSID]) { > - struct net *net = rtnl_link_get_net_capable(skb, dev_net(dev), > - tb, CAP_NET_ADMIN); > + int new_ifindex = -1;
pls ignore this patch. new_ifindex has to be initialized to 0 here. I found this when I tested this patch but forgot to commit a fix. Thanks, Andrei