Эх сурвалжийг харах

[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>
Andrew Morton 17 жил өмнө
parent
commit
98eb5683fb
1 өөрчлөгдсөн 1 нэмэгдсэн , 1 устгасан
  1. 1 1
      net/tipc/socket.c

+ 1 - 1
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;