]> err.no Git - linux-2.6/commitdiff
[VLAN]: Lost rtnl_unlock() in vlan_ioctl()
authorPavel Emelyanov <xemul@openvz.org>
Fri, 7 Dec 2007 06:52:16 +0000 (22:52 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Fri, 7 Dec 2007 09:07:55 +0000 (01:07 -0800)
The SET_VLAN_NAME_TYPE_CMD command w/o CAP_NET_ADMIN capability
doesn't release the rtnl lock.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/8021q/vlan.c

index 6567213959cbac09f68a2a4973d4283361688196..5b183156307a6c3f2ddc245206e2892b53f4d7c5 100644 (file)
@@ -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;