]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
VLAN: Lost rtnl_unlock() in vlan_ioctl()
authorPavel Emelyanov <xemul@openvz.org>
Thu, 20 Dec 2007 00:30:48 +0000 (16:30 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 8 Feb 2008 20:01:14 +0000 (12:01 -0800)
[VLAN]: Lost rtnl_unlock() in vlan_ioctl()

[ Upstream commit: e35de02615f97b785dc6f73cba421cea06bcbd10 ]

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
net/8021q/vlan.c

index ef3f7898232848eae21cf5808884eefbbfdc29d5..21af4417225cac68851183c9f82fbb33686aebbe 100644 (file)
@@ -768,7 +768,7 @@ static int vlan_ioctl_handler(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;