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

* Re: [PATCH][VLAN] Lost rtnl_unlock() in vlan_ioctl()
  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-07  6:52   ` David Miller
  0 siblings, 2 replies; 5+ messages in thread
From: Patrick McHardy @ 2007-12-06 13:59 UTC (permalink / raw)
  To: Pavel Emelyanov; +Cc: David Miller, Linux Netdev List, devel

Pavel Emelyanov wrote:
> The SET_VLAN_NAME_TYPE_CMD command w/o CAP_NET_ADMIN capability
> doesn't release the rtnl lock.


Thanks Pavel. I somehow recall that we already fixed this
one, but can't find the patch :) Dave, please apply.


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

* Re: [PATCH][VLAN] Lost rtnl_unlock() in vlan_ioctl()
  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
  1 sibling, 1 reply; 5+ messages in thread
From: David Miller @ 2007-12-06 14:01 UTC (permalink / raw)
  To: kaber; +Cc: xemul, netdev, devel

From: Patrick McHardy <kaber@trash.net>
Date: Thu, 06 Dec 2007 14:59:24 +0100

> Pavel Emelyanov wrote:
> > The SET_VLAN_NAME_TYPE_CMD command w/o CAP_NET_ADMIN capability
> > doesn't release the rtnl lock.
> 
> 
> Thanks Pavel. I somehow recall that we already fixed this
> one, but can't find the patch :) Dave, please apply.

I think we even added this bug to -stable, or something like
that, didn't we?  Yikes...

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

* Re: [PATCH][VLAN] Lost rtnl_unlock() in vlan_ioctl()
  2007-12-06 14:01   ` David Miller
@ 2007-12-06 14:10     ` Patrick McHardy
  0 siblings, 0 replies; 5+ messages in thread
From: Patrick McHardy @ 2007-12-06 14:10 UTC (permalink / raw)
  To: David Miller; +Cc: xemul, netdev, devel

David Miller wrote:
> From: Patrick McHardy <kaber@trash.net>
> Date: Thu, 06 Dec 2007 14:59:24 +0100
> 
>> Pavel Emelyanov wrote:
>>> The SET_VLAN_NAME_TYPE_CMD command w/o CAP_NET_ADMIN capability
>>> doesn't release the rtnl lock.
>>
>> Thanks Pavel. I somehow recall that we already fixed this
>> one, but can't find the patch :) Dave, please apply.
> 
> I think we even added this bug to -stable, or something like
> that, didn't we?  Yikes...


No, I mixed those two patches up as well. The bug was introduced
with the vlan_netlink stuff, the -stable patch fixed an invalid
return value, but still properly dropped the lock.

This patch should of course go in -stable anyway.



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

* Re: [PATCH][VLAN] Lost rtnl_unlock() in vlan_ioctl()
  2007-12-06 13:59 ` Patrick McHardy
  2007-12-06 14:01   ` David Miller
@ 2007-12-07  6:52   ` David Miller
  1 sibling, 0 replies; 5+ messages in thread
From: David Miller @ 2007-12-07  6:52 UTC (permalink / raw)
  To: kaber; +Cc: xemul, netdev, devel

From: Patrick McHardy <kaber@trash.net>
Date: Thu, 06 Dec 2007 14:59:24 +0100

> Pavel Emelyanov wrote:
> > The SET_VLAN_NAME_TYPE_CMD command w/o CAP_NET_ADMIN capability
> > doesn't release the rtnl lock.
> 
> 
> Thanks Pavel. I somehow recall that we already fixed this
> one, but can't find the patch :) Dave, please apply.

Applied and I'll push to -stable once Linus pulls it in.

^ permalink raw reply	[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).