[ltt-dev] [PATCH] ltt-relay: fix cpu offline problem

Lai Jiangshan laijs at cn.fujitsu.com
Sun Dec 7 22:17:59 EST 2008


ltt_relay_open() will close allocated buffers when failed.
but if cpu offlined, some buffer will not be closed.
this patch fixed it.

Signed-off-by: Lai Jiangshan <laijs at cn.fujitsu.com>
---
--- linux-2.6.27.7-lttng-0.61.orig/ltt/ltt-relay-alloc.c	2008-12-03 16:25:21.000000000 +0800
+++ linux-2.6.27.7-lttng-0.61/ltt/ltt-relay-alloc.c	2008-12-08 11:12:33.000000000 +0800
@@ -385,10 +385,9 @@ struct rchan *ltt_relay_open(const char 
 	return chan;
 
 free_bufs:
-	for_each_online_cpu(i) {
-		if (!chan->buf[i])
-			break;
-		relay_close_buf(chan->buf[i]);
+	for_each_possible_cpu(i) {
+		if (chan->buf[i])
+			relay_close_buf(chan->buf[i]);
 	}
 
 	kref_put(&chan->kref, relay_destroy_channel);





More information about the lttng-dev mailing list