netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: akpm@linux-foundation.org
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, akpm@linux-foundation.org,
	allan.stephens@windriver.com, jon.maloy@ericsson.com,
	kjwinchester@gmail.com, per.liden@ericsson.com,
	stable@kernel.org
Subject: [patch 3/4] tipc: fix semaphore handling
Date: Thu, 13 Dec 2007 16:02:36 -0800	[thread overview]
Message-ID: <200712140002.lBE02b3G025494@imap1.linux-foundation.org> (raw)

From: Andrew Morton <akpm@linux-foundation.org>

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.

Cc: Kevin Winchester <kjwinchester@gmail.com>
Cc: Per Liden <per.liden@ericsson.com>
Cc: Jon Maloy <jon.maloy@ericsson.com>
Cc: Allan Stephens <allan.stephens@windriver.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 net/tipc/socket.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN net/tipc/socket.c~tipc-fix-semaphore-handling net/tipc/socket.c
--- a/net/tipc/socket.c~tipc-fix-semaphore-handling
+++ a/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;
_

             reply	other threads:[~2007-12-14  0:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-12-14  0:02 akpm [this message]
2007-12-14 19:31 ` [patch 3/4] tipc: fix semaphore handling David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200712140002.lBE02b3G025494@imap1.linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=allan.stephens@windriver.com \
    --cc=davem@davemloft.net \
    --cc=jon.maloy@ericsson.com \
    --cc=kjwinchester@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=per.liden@ericsson.com \
    --cc=stable@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).