On Thu, Jul 17, 2014 at 10:57:55AM +0200, Dietmar Eggemann wrote:
> There is also the possibility that the memory for sched_group sg is not
> (completely) zeroed out:
>
> sg = kzalloc_node(sizeof(struct sched_group) + cpumask_size(),
> GFP_KERNEL, cpu_to_node(j));
>
>
> struct sched_group {
> ...
> * NOTE: this field is variable length. (Allocated dynamically
> * by attaching extra space to the end of the structure,
> * depending on how many CPUs the kernel has booted up with)
> */
> unsigned long cpumask[0];well kZalloc should Zero the entire allocated size, and the specified size very much includes the cpumask size as per: sizeof(struct sched_group) + cpumask_size() But yeah, I'm also a bit puzzled why this goes bang. Makes we worry we scribble it somewhere or so.
pgpSh5fQK1jrJ.pgp
Description: PGP signature

