From: laijs@cn.fujitsu.com (Lai Jiangshan)
Subject: [ltt-dev] [PATCH] ltt-relay: fix cpu offline problem
Date: Mon, 08 Dec 2008 11:17:59 +0800 [thread overview]
Message-ID: <493C91E7.7050006@cn.fujitsu.com> (raw)
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);
next reply other threads:[~2008-12-08 3:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-08 3:17 Lai Jiangshan [this message]
2008-12-09 16:23 ` Mathieu Desnoyers
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=493C91E7.7050006@cn.fujitsu.com \
--to=laijs@cn.fujitsu.com \
/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