lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 5 Aug 2013 12:42:00 +0800
From:	Wei Yongjun <weiyj.lk@...il.com>
To:	cmetcalf@...era.com, davem@...emloft.net
Cc:	yongjun_wei@...ndmicro.com.cn, netdev@...r.kernel.org
Subject: [PATCH -next] tile: fix missing unlock on error in tile_net_open()

From: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>

Add the missing unlock before return from function tile_net_open()
in the error handling case.

Introduced by commit f3286a3af89d6db7a488f3e8f02b98d67d50f00c.
(tile: support multiple mPIPE shims in tilegx network driver)

Signed-off-by: Wei Yongjun <yongjun_wei@...ndmicro.com.cn>
---
 drivers/net/ethernet/tile/tilegx.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/tile/tilegx.c b/drivers/net/ethernet/tile/tilegx.c
index 907b577..5d2a719 100644
--- a/drivers/net/ethernet/tile/tilegx.c
+++ b/drivers/net/ethernet/tile/tilegx.c
@@ -1510,8 +1510,10 @@ static int tile_net_open(struct net_device *dev)
 
 	/* Get the instance info. */
 	rc = gxio_mpipe_link_instance(dev->name);
-	if (rc < 0 || rc >= NR_MPIPE_MAX)
+	if (rc < 0 || rc >= NR_MPIPE_MAX) {
+		mutex_unlock(&tile_net_devs_for_channel_mutex);
 		return -EIO;
+	}
 
 	priv->instance = rc;
 	instance = rc;

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ