All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch] econet: unlock on -EPERM path
@ 2010-12-07 11:01 ` Dan Carpenter
  0 siblings, 0 replies; 8+ messages in thread
From: Dan Carpenter @ 2010-12-07 11:01 UTC (permalink / raw)
  To: netdev; +Cc: Phil Blundell, Eric Dumazet, David S. Miller, kernel-janitors

We need to do a mutex_unlock() and a put_dev() before returning.

Signed-off-by: Dan Carpenter <error27@gmail.com>

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) {

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

end of thread, other threads:[~2010-12-08 18:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-07 11:01 [patch] econet: unlock on -EPERM path Dan Carpenter
2010-12-07 11:01 ` Dan Carpenter
2010-12-07 22:01 ` Jarek Poplawski
2010-12-07 22:01   ` Jarek Poplawski
2010-12-07 22:09   ` Jarek Poplawski
2010-12-07 22:09     ` Jarek Poplawski
2010-12-08 18:14 ` David Miller
2010-12-08 18:14   ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.