[TIPC]: Fix semaphore handling.
authorAndrew Morton <akpm@linux-foundation.org>
Wed, 12 Dec 2007 19:24:19 +0000 (11:24 -0800)
committerDavid S. Miller <davem@sunset.davemloft.net>
Fri, 14 Dec 2007 21:54:37 +0000 (13:54 -0800)
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.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/socket.c

index 6b792265dc06e5b08085095178bd4fba3e427ff7..24ddfd2ca38bf037e6b1710e78dedcd24aa0e1df 100644 (file)
@@ -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;