* [PATCH] econet: Do the correct cleanup after an unprivileged SIOCSIFADDR.
@ 2010-12-05 22:45 Nelson Elhage
2010-12-08 18:14 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Nelson Elhage @ 2010-12-05 22:45 UTC (permalink / raw)
To: David S. Miller, Phil Blundell; +Cc: netdev, Nelson Elhage, stable
We need to drop the mutex and do a dev_put, so set an error code and break like
the other paths, instead of returning directly.
Cc: stable@kernel.org
Signed-off-by: Nelson Elhage <nelhage@ksplice.com>
---
net/econet/af_econet.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/net/econet/af_econet.c b/net/econet/af_econet.c
index 13992e1..f180371 100644
--- a/net/econet/af_econet.c
+++ b/net/econet/af_econet.c
@@ -661,8 +661,10 @@ static int ec_dev_ioctl(struct socket *sock, unsigned int cmd, void __user *arg)
err = 0;
switch (cmd) {
case SIOCSIFADDR:
- if (!capable(CAP_NET_ADMIN))
- return -EPERM;
+ if (!capable(CAP_NET_ADMIN)) {
+ err = -EPERM;
+ break;
+ }
edev = dev->ec_ptr;
if (edev == NULL) {
--
1.7.1.31.g6297e
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] econet: Do the correct cleanup after an unprivileged SIOCSIFADDR.
2010-12-05 22:45 [PATCH] econet: Do the correct cleanup after an unprivileged SIOCSIFADDR Nelson Elhage
@ 2010-12-08 18:14 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2010-12-08 18:14 UTC (permalink / raw)
To: nelhage; +Cc: philb, netdev, stable
From: Nelson Elhage <nelhage@ksplice.com>
Date: Sun, 5 Dec 2010 17:45:52 -0500
> We need to drop the mutex and do a dev_put, so set an error code and break like
> the other paths, instead of returning directly.
>
> Cc: stable@kernel.org
> Signed-off-by: Nelson Elhage <nelhage@ksplice.com>
Applied, thanks Nelson.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-12-08 18:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-05 22:45 [PATCH] econet: Do the correct cleanup after an unprivileged SIOCSIFADDR Nelson Elhage
2010-12-08 18:14 ` 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).