Message ID | 20101207110138.GM10623@bicker |
---|---|
State | Not Applicable, archived |
Delegated to: | David Miller |
Headers | show |
Dan Carpenter wrote:
> We need to do a mutex_unlock() and a put_dev() before returning.
Good catch! Btw, isn't this put_dev() below, in case SIOCGIFADDR,
superfluous?
Jarek P.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Jarek Poplawski wrote: > Dan Carpenter wrote: >> We need to do a mutex_unlock() and a put_dev() before returning. > > Good catch! Btw, isn't this put_dev() below, in case SIOCGIFADDR, > superfluous? Hmm... put_dev() a.k.a. dev_put() ;-) Jarek P. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Dan Carpenter <error27@gmail.com> Date: Tue, 7 Dec 2010 14:01:38 +0300 > We need to do a mutex_unlock() and a put_dev() before returning. > > Signed-off-by: Dan Carpenter <error27@gmail.com> Nelson Elhage beat you to this one, so I integrates his version. Thanks. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
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) {
We need to do a mutex_unlock() and a put_dev() before returning. Signed-off-by: Dan Carpenter <error27@gmail.com> -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html