* [patch 3/4] tipc: fix semaphore handling
@ 2007-12-14 0:02 akpm
2007-12-14 19:31 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: akpm @ 2007-12-14 0:02 UTC (permalink / raw)
To: davem
Cc: netdev, akpm, allan.stephens, jon.maloy, kjwinchester, per.liden,
stable
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;
_
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [patch 3/4] tipc: fix semaphore handling
2007-12-14 0:02 [patch 3/4] tipc: fix semaphore handling akpm
@ 2007-12-14 19:31 ` David Miller
0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2007-12-14 19:31 UTC (permalink / raw)
To: akpm; +Cc: netdev, allan.stephens, jon.maloy, kjwinchester, per.liden,
stable
From: akpm@linux-foundation.org
Date: Thu, 13 Dec 2007 16:02:36 -0800
> 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>
This is already in my net-2.6 tree, but thanks for resubmitting
anyways :)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-12-14 19:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-14 0:02 [patch 3/4] tipc: fix semaphore handling akpm
2007-12-14 19:31 ` David Miller
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).