[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <200712140002.lBE02b3G025494@imap1.linux-foundation.org>
Date: Thu, 13 Dec 2007 16:02:36 -0800
From: akpm@...ux-foundation.org
To: davem@...emloft.net
Cc: netdev@...r.kernel.org, akpm@...ux-foundation.org,
allan.stephens@...driver.com, jon.maloy@...csson.com,
kjwinchester@...il.com, per.liden@...csson.com, stable@...nel.org
Subject: [patch 3/4] tipc: fix semaphore handling
From: Andrew Morton <akpm@...ux-foundation.org>
As noted by Kevin, tipc's release() does down_interruptible() and ignores the
return value. So if signal_pending() we'll end up doing up() on a non-downed
semaphore. Fix.
Cc: Kevin Winchester <kjwinchester@...il.com>
Cc: Per Liden <per.liden@...csson.com>
Cc: Jon Maloy <jon.maloy@...csson.com>
Cc: Allan Stephens <allan.stephens@...driver.com>
Cc: "David S. Miller" <davem@...emloft.net>
Cc: <stable@...nel.org>
Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>
---
net/tipc/socket.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -puN net/tipc/socket.c~tipc-fix-semaphore-handling net/tipc/socket.c
--- a/net/tipc/socket.c~tipc-fix-semaphore-handling
+++ a/net/tipc/socket.c
@@ -253,7 +253,7 @@ static int release(struct socket *sock)
dbg("sock_delete: %x\n",tsock);
if (!tsock)
return 0;
- down_interruptible(&tsock->sem);
+ down(&tsock->sem);
if (!sock->sk) {
up(&tsock->sem);
return 0;
_
--
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