From: Lai Jiangshan <laijs@cn.fujitsu.com>
To: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Cc: Tom Zanussi <zanussi@comcast.net>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Relay : fix cpu offline problem
Date: Wed, 10 Dec 2008 08:33:27 +0800 [thread overview]
Message-ID: <493F0E57.7090206@cn.fujitsu.com> (raw)
In-Reply-To: <20081209162512.GB24039@Krystal>
Hi, Mathieu Desnoyers
I have fixed this problem in mainline.
http://lkml.org/lkml/2008/11/14/74
Lai
Mathieu Desnoyers wrote:
> Here is a fix for how relay handles cpu hotplug in the allocation error path. If
> a cpu goes down while allocating, it may result in a buffer never being freed.
>
> Lai Jiangshan originally identified this problem in the LTTng fork of
> relay (ltt-relay-alloc). Here is the fix which applies to the original
> kernel/relay.c.
>
> Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
> CC: Lai Jiangshan <laijs@cn.fujitsu.com>
> CC: Tom Zanussi <zanussi@comcast.net>
> ---
> kernel/relay.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> Index: linux-2.6-lttng/kernel/relay.c
> ===================================================================
> --- linux-2.6-lttng.orig/kernel/relay.c 2008-12-09 10:58:45.000000000 -0500
> +++ linux-2.6-lttng/kernel/relay.c 2008-12-09 11:09:58.000000000 -0500
> @@ -611,10 +611,9 @@ struct rchan *relay_open(const char *bas
> 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 prev parent reply other threads:[~2008-12-10 0:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-09 16:25 [PATCH] Relay : fix cpu offline problem Mathieu Desnoyers
2008-12-10 0:33 ` Lai Jiangshan [this message]
2008-12-10 1:54 ` Mathieu Desnoyers
-- strict thread matches above, loose matches on Subject: below --
2008-11-14 9:33 [PATCH] relay: " Lai Jiangshan
2008-11-14 9:41 ` Jens Axboe
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=493F0E57.7090206@cn.fujitsu.com \
--to=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@polymtl.ca \
--cc=zanussi@comcast.net \
/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