Re: [patch 3/4] tipc: fix semaphore handling

2007-12-14 Thread David Miller
From: [EMAIL PROTECTED]
Date: Thu, 13 Dec 2007 16:02:36 -0800

 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]
 Cc: [EMAIL PROTECTED]
 Signed-off-by: Andrew Morton [EMAIL PROTECTED]

This is already in my net-2.6 tree, but thanks for resubmitting
anyways :)
--
To unsubscribe from this list: send the line unsubscribe netdev in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[patch 3/4] tipc: fix semaphore handling

2007-12-13 Thread akpm
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]
Cc: [EMAIL PROTECTED]
Signed-off-by: Andrew Morton [EMAIL PROTECTED]
---

 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 [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html