From: Pavel Emelyanov Date: Thu, 20 Dec 2007 00:30:48 +0000 (-0800) Subject: VLAN: Lost rtnl_unlock() in vlan_ioctl() X-Git-Tag: v2.6.23.15~65 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1d8782173cb23a56d624b30095dd3e0daaa821c5;p=thirdparty%2Fkernel%2Fstable.git VLAN: Lost rtnl_unlock() in vlan_ioctl() [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 Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c index ef3f789823284..21af4417225ca 100644 --- a/net/8021q/vlan.c +++ b/net/8021q/vlan.c @@ -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;