Re: [PATCH] sched_groups are expected to be circular linked list, make it so right after allocation

Peter Zijlstra
2012-05-09T11:52:21Z

On Wed, 2012-05-09 at 13:44 +0200, Igor Mammedov wrote:
> This patch fixes only build_sched_groups path, but there is another fail path
> that results in below OOPS.
> build_overlap_sched_groups() may exit without setting groups and later it will crash
> init_sched_groups_power as well.

if that allocation fails? Or is there another fail path?

> But I just don't know how to fix it, so I've just
> posted partial fix that reduces crash frequency.

> And I have to admit that
> cpu_active_mask and siblings map are busted but we either should not exit from builder
> funcs with NULL group or BUG there if it is impossible to come-up with sane group
> for insane domain span.

I'm perfectly OK with taking the machine down, provided we can output
useful messages as to what is broken first..