aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/socket.c
diff options
context:
space:
mode:
authorAndrew Morton <akpm@linux-foundation.org>2007-12-12 14:24:19 -0500
committerDavid S. Miller <davem@sunset.davemloft.net>2007-12-14 16:54:37 -0500
commit98eb5683fb94c458b3c8d121797bc9aa1baf4e7e (patch)
treed572e7ef5654905072dd3a0e6017ec67785a4486 /net/tipc/socket.c
parentcbebc51f7b77d26ec23145d6ef22ac2b209f7955 (diff)
[TIPC]: Fix semaphore handling.
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>
Diffstat (limited to 'net/tipc/socket.c')
-rw-r--r--net/tipc/socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/tipc/socket.c b/net/tipc/socket.c
index 6b792265dc06..24ddfd2ca38b 100644
--- a/net/tipc/socket.c
+++ b/net/tipc/socket.c
@@ -253,7 +253,7 @@ static int release(struct socket *sock)
253 dbg("sock_delete: %x\n",tsock); 253 dbg("sock_delete: %x\n",tsock);
254 if (!tsock) 254 if (!tsock)
255 return 0; 255 return 0;
256 down_interruptible(&tsock->sem); 256 down(&tsock->sem);
257 if (!sock->sk) { 257 if (!sock->sk) {
258 up(&tsock->sem); 258 up(&tsock->sem);
259 return 0; 259 return 0;