diff mbox

sched: fix: initialization of sched_domain_topology for NUMA

Message ID 1399929376-4597-1-git-send-email-vincent.guittot@linaro.org
State Superseded
Headers show

Commit Message

Vincent Guittot May 12, 2014, 9:16 p.m. UTC
sched_domain_topology table is a null terminated array. 
Add 1 row in the allocation size that will be used as the last row of the
table.

Reported-by: Jet Chen <jet.chen@intel.com>
Tested-by: Jet Chen <jet.chen@intel.com>
Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
link: https://lkml.org/lkml/2014/5/12/130

---

Hi Ingo and Peter,

This patch fixes the problem that has been reported by Jet Chen 

Regards,
Vincent

 kernel/sched/core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Peter Zijlstra May 13, 2014, 8:26 a.m. UTC | #1
On Mon, May 12, 2014 at 11:16:16PM +0200, Vincent Guittot wrote:
> sched_domain_topology table is a null terminated array. 
> Add 1 row in the allocation size that will be used as the last row of the
> table.
> 
> Reported-by: Jet Chen <jet.chen@intel.com>
> Tested-by: Jet Chen <jet.chen@intel.com>
> Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
> link: https://lkml.org/lkml/2014/5/12/130
> 
> ---
> 
> Hi Ingo and Peter,
> 
> This patch fixes the problem that has been reported by Jet Chen 
> 

I have no mail from Jet Chen on any recent issues.

Also, please describe both the problem and the fix in the Changelog
without need to refer to secondary sources.

As it stands I've no clue wth this is about.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
Vincent Guittot May 13, 2014, 8:33 a.m. UTC | #2
On 13 May 2014 10:26, Peter Zijlstra <peterz@infradead.org> wrote:
> On Mon, May 12, 2014 at 11:16:16PM +0200, Vincent Guittot wrote:
>> sched_domain_topology table is a null terminated array.
>> Add 1 row in the allocation size that will be used as the last row of the
>> table.
>>
>> Reported-by: Jet Chen <jet.chen@intel.com>
>> Tested-by: Jet Chen <jet.chen@intel.com>
>> Signed-off-by: Vincent Guittot <vincent.guittot@linaro.org>
>> link: https://lkml.org/lkml/2014/5/12/130
>>
>> ---
>>
>> Hi Ingo and Peter,
>>
>> This patch fixes the problem that has been reported by Jet Chen
>>
>
> I have no mail from Jet Chen on any recent issues.

Hi Peter,

I have just noticed that you were not in the list of the original message

>
> Also, please describe both the problem and the fix in the Changelog
> without need to refer to secondary sources.

Ok, i'm going to update the commit message with more information

>
> As it stands I've no clue wth this is about.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/
diff mbox

Patch

diff --git a/kernel/sched/core.c b/kernel/sched/core.c
index 4ea7b3f..205fa17 100644
--- a/kernel/sched/core.c
+++ b/kernel/sched/core.c
@@ -6234,7 +6234,7 @@  static void sched_init_numa(void)
 	/* Compute default topology size */
 	for (i = 0; sched_domain_topology[i].mask; i++);
 
-	tl = kzalloc((i + level) *
+	tl = kzalloc((i + level + 1) *
 			sizeof(struct sched_domain_topology_level), GFP_KERNEL);
 	if (!tl)
 		return;