From: Andrew Morton Date: Wed, 12 Dec 2007 19:24:19 +0000 (-0800) Subject: [TIPC]: Fix semaphore handling. X-Git-Tag: v2.6.24-rc6~67^2~14 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=98eb5683fb94c458b3c8d121797bc9aa1baf4e7e;p=linux-2.6 [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 Signed-off-by: David S. Miller --- diff --git a/net/tipc/socket.c b/net/tipc/socket.c index 6b792265dc..24ddfd2ca3 100644 --- a/net/tipc/socket.c +++ b/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;