netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH][VLAN] Lost rtnl_unlock() in vlan_ioctl()
@ 2007-12-06 13:52 Pavel Emelyanov
  2007-12-06 13:59 ` Patrick McHardy
  0 siblings, 1 reply; 5+ messages in thread
From: Pavel Emelyanov @ 2007-12-06 13:52 UTC (permalink / raw)
  To: David Miller, Patrick McHardy; +Cc: Linux Netdev List, devel

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>

---

diff --git a/net/8021q/vlan.c b/net/8021q/vlan.c
index 6567213..5b18315 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;

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-12-07  6:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-06 13:52 [PATCH][VLAN] Lost rtnl_unlock() in vlan_ioctl() Pavel Emelyanov
2007-12-06 13:59 ` Patrick McHardy
2007-12-06 14:01   ` David Miller
2007-12-06 14:10     ` Patrick McHardy
2007-12-07  6:52   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).