From: Pavel Emelyanov Date: Fri, 7 Dec 2007 06:52:16 +0000 (-0800) Subject: [VLAN]: Lost rtnl_unlock() in vlan_ioctl() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e35de02615f97b785dc6f73cba421cea06bcbd10;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [VLAN]: Lost rtnl_unlock() in vlan_ioctl() The SET_VLAN_NAME_TYPE_CMD command w/o CAP_NET_ADMIN capability doesn't release the rtnl lock. Signed-off-by: Pavel Emelyanov Signed-off-by: David S. Miller --- diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c index 6567213959cb..5b183156307a 100644 --- a/net/8021q/vlan.c +++ b/net/8021q/vlan.c @@ -776,7 +776,7 @@ static int vlan_ioctl_handler(struct net *net, void __user *arg) case SET_VLAN_NAME_TYPE_CMD: err = -EPERM; if (!capable(CAP_NET_ADMIN)) - return -EPERM; + break; if ((args.u.name_type >= 0) && (args.u.name_type < VLAN_NAME_TYPE_HIGHEST)) { vlan_name_type = args.u.name_type;