]> git.baikalelectronics.ru Git - kernel.git/commit
rtnetlink: release net refcnt on error in do_setlink()
authorNicolas Dichtel <nicolas.dichtel@6wind.com>
Thu, 27 Nov 2014 09:16:15 +0000 (10:16 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 30 Nov 2014 05:05:43 +0000 (21:05 -0800)
commit03f7b1a749d5804855e45f3329177719336c7d64
tree8576df0d94d61a55762de13b2651f3ce00da1834
parentf8ac36c85fc01821f27beff6340335b3fbc78d20
rtnetlink: release net refcnt on error in do_setlink()

rtnl_link_get_net() holds a reference on the 'struct net', we need to release
it in case of error.

CC: Eric W. Biederman <ebiederm@xmission.com>
Fixes: 9842c389d8e1 ("net: Enable a userns root rtnl calls that are safe for unprivilged users")
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Reviewed-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/rtnetlink.c