From: Andrew Morton Date: Wed, 12 Dec 2007 19:24:19 +0000 (-0800) Subject: [TIPC]: Fix semaphore handling. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=98eb5683fb94c458b3c8d121797bc9aa1baf4e7e;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [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 6b792265dc06..24ddfd2ca38b 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;