Skip to contentSkip to conversation

tipc: fix semaphore handling

PATCH Applied [email protected] 2 participants 2 messages Dec 14, 2007

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 3/4 tipc: fix semaphore handling

From: Andrew Morton <[email protected]>

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 <[email protected]>
Cc Per Liden <[email protected]>
Cc Jon Maloy <[email protected]>
Cc Allan Stephens <[email protected]>
Cc "David S. Miller" <[email protected]>

---

 net/tipc/socket.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/tipc/socket.c renamed from net/tipc/socket.c~tipc-fix-semaphore-handling +1 -1
diff -puN net/tipc/socket.c~tipc-fix-semaphore-handling 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;

_

maintainer
#1 lore raw

From: [email protected]
Date: Thu, 13 Dec 2007 16:02:36 -0800

Quoted 6 lines

From: Andrew Morton <[email protected]>

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.

Quoted 7 lines
Cc Kevin Winchester <[email protected]>
Cc Per Liden <[email protected]>
Cc Jon Maloy <[email protected]>
Cc Allan Stephens <[email protected]>
Cc "David S. Miller" <[email protected]>

This is already in my net-2.6 tree, but thanks for resubmitting anyways :)