[<prev] [next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0810241046240.16432@melkki.cs.Helsinki.FI>
Date: Fri, 24 Oct 2008 10:48:23 +0300 (EEST)
From: Pekka J Enberg <penberg@...helsinki.fi>
To: akpm@...ux-foundation.org
cc: zanussi@...cast.net, mathieu.desnoyers@...ymtl.ca,
linux-kernel@...r.kernel.org
Subject: [PATCH] relayfs: fix infinite loop with splice()
From: Tom Zanussi <zanussi@...cast.net>
Running kmemtraced, which uses splice() on relayfs, causes a hard lock on
x86-64 SMP. As described by Tom Zanussi:
It looks like you hit the same problem as described here:
commit 8191ecd1d14c6914c660dfa007154860a7908857
splice: fix infinite loop in generic_file_splice_read()
relay uses the same loop but it never got noticed or fixed.
Cc: Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
Tested-by: Pekka Enberg <penberg@...helsinki.fi>
Signed-off-by: Tom Zanussi <tzanussi@...il.com>
Signed-off-by: Pekka Enberg <penberg@...helsinki.fi>
---
kernel/relay.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/kernel/relay.c b/kernel/relay.c
index 8d13a78..6a4d439 100644
--- a/kernel/relay.c
+++ b/kernel/relay.c
@@ -1318,12 +1318,9 @@ static ssize_t relay_file_splice_read(struct file *in,
if (ret < 0)
break;
else if (!ret) {
- if (spliced)
- break;
- if (flags & SPLICE_F_NONBLOCK) {
+ if (flags & SPLICE_F_NONBLOCK)
ret = -EAGAIN;
- break;
- }
+ break;
}
*ppos += ret;
--
1.5.4.3
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists