[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <493F0E57.7090206@cn.fujitsu.com>
Date: Wed, 10 Dec 2008 08:33:27 +0800
From: Lai Jiangshan <laijs@...fujitsu.com>
To: Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
CC: Tom Zanussi <zanussi@...cast.net>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] Relay : fix cpu offline problem
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@...ymtl.ca>
> CC: Lai Jiangshan <laijs@...fujitsu.com>
> CC: Tom Zanussi <zanussi@...cast.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);
--
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