From: Hillf Danton <dhillf@gmail.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: LKML <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH] sched: try to fix mm leak when freeing sched groups
Date: Thu, 21 Apr 2011 21:46:57 +0800 [thread overview]
Message-ID: <BANLkTinYu00M9No_Pqxp+gpEZAmPJPDt1g@mail.gmail.com> (raw)
In-Reply-To: <1303393450.2035.142.camel@laptop>
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=UTF-8, Size: 2381 bytes --]
On Thu, Apr 21, 2011 at 9:44 PM, Peter Zijlstra <peterz@infradead.org> wrote:
> On Thu, 2011-04-21 at 21:37 +0800, Hillf Danton wrote:
>> When freeing sched groups, there is a sg (== sched_group_nodes[i]) not
>> got freed.
>> The relevant code is reshuffled to be clearer, and correct.
>
> The code doesn't even appear to exist, what kernel are you patching?
>
Hi Peter
It is linux-2.6.39-rc1.tar.bz2 downloaded at kernel.org, and
>> --- a/kernel/sched.c  2011-03-30 03:09:48.000000000 +0800
is the time stamp, right?
thanks
Hillf
>> Signed-off-by: Hillf Danton <dhillf@gmail.com>
>> ---
>>
>> --- a/kernel/sched.c  2011-03-30 03:09:48.000000000 +0800
>> +++ b/kernel/sched.c  2011-04-21 21:09:00.000000000 +0800
>> @@ -7106,7 +7106,7 @@ static void free_sched_groups(const stru
>> Â Â Â Â Â Â Â Â Â Â Â continue;
>>
>> Â Â Â Â Â Â Â for (i = 0; i < nr_node_ids; i++) {
>> - Â Â Â Â Â Â Â Â Â Â struct sched_group *oldsg, *sg = sched_group_nodes[i];
>> + Â Â Â Â Â Â Â Â Â Â struct sched_group *sg = sched_group_nodes[i];
>>
>> Â Â Â Â Â Â Â Â Â Â Â cpumask_and(nodemask, cpumask_of_node(i), cpu_map);
>> Â Â Â Â Â Â Â Â Â Â Â if (cpumask_empty(nodemask))
>> @@ -7114,13 +7114,11 @@ static void free_sched_groups(const stru
>>
>> Â Â Â Â Â Â Â Â Â Â Â if (sg == NULL)
>> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â continue;
>> - Â Â Â Â Â Â Â Â Â Â sg = sg->next;
>> -next_sg:
>> - Â Â Â Â Â Â Â Â Â Â oldsg = sg;
>> - Â Â Â Â Â Â Â Â Â Â sg = sg->next;
>> - Â Â Â Â Â Â Â Â Â Â kfree(oldsg);
>> - Â Â Â Â Â Â Â Â Â Â if (oldsg != sched_group_nodes[i])
>> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â goto next_sg;
>> + Â Â Â Â Â Â Â Â Â Â do {
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â struct sched_group *next = sg->next;
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â kfree(sg);
>> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â sg = next;
>> + Â Â Â Â Â Â Â Â Â Â } while (sg != sched_group_nodes[i]);
>> Â Â Â Â Â Â Â }
>> Â Â Â Â Â Â Â kfree(sched_group_nodes);
>> Â Â Â Â Â Â Â sched_group_nodes_bycpu[cpu] = NULL;
>
>
>
>
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
next prev parent reply other threads:[~2011-04-21 13:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-21 13:37 Hillf Danton
2011-04-21 13:44 ` Peter Zijlstra
2011-04-21 13:46 ` Hillf Danton [this message]
2011-04-21 14:20 ` Peter Zijlstra
2011-04-21 14:22 ` Hillf Danton
2011-05-02 2:38 ` Hillf Danton
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=BANLkTinYu00M9No_Pqxp+gpEZAmPJPDt1g@mail.gmail.com \
--to=dhillf@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
/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
all inboxes | Powered by JetHome®