Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1286192
| From | Ingo Molnar <mingo@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 1/4] cpumask: Migrate 'alloc_cpumask_var()' users to 'zalloc_cpumask_var()' |
| Date | 2015-12-08 05:10 +0100 |
| Message-ID | <qDhLc-5Ko-13@gated-at.bofh.it> (permalink) |
| References | <qCZOh-2cf-5@gated-at.bofh.it> <qCZOi-2cf-25@gated-at.bofh.it> <qDfgl-43Y-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
* Linus Torvalds <torvalds@linux-foundation.org> wrote: > On Mon, Dec 7, 2015 at 12:49 AM, Ingo Molnar <mingo@kernel.org> wrote: > > Xunlei Pang reported a scheduler bug in init_rootdomain(), which is > > caused by improper use of alloc_cpumask_var(), which results in > > uninitialized cpumasks being allocated. > > > > No-one noticed this scheduler bug for a long time, probably because > > alloc_cpumask_var() does result in initialized cpumasks in the > > !CPUMASK_OFFSTACK case - which is the vast majority of systems > > out there. > > > > So migrate all alloc_cpumask_var() users over to zalloc_cpumask_var(), to be > > on the safe side. > > Ugh. I'd rather just see us say that "allocating a cpumask always returns a > zeroed mask". > > There really is no reason to ever not zero it (they aren't _that_ big even on > huge machines), so I'd rather just get rid of the "zalloc" version that is the > less common one anyway. Sure - that was my original suggestion, will reshape the series to do it like that. Thanks, Ingo -- 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/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/4] [RFC] cpumask: Robustify the var-cpumask allocation APIs Ingo Molnar <mingo@kernel.org> - 2015-12-07 10:00 +0100
[PATCH 1/4] cpumask: Migrate 'alloc_cpumask_var()' users to 'zalloc_cpumask_var()' Ingo Molnar <mingo@kernel.org> - 2015-12-07 10:00 +0100
Re: [PATCH 1/4] cpumask: Migrate 'alloc_cpumask_var()' users to 'zalloc_cpumask_var()' Linus Torvalds <torvalds@linux-foundation.org> - 2015-12-08 02:30 +0100
Re: [PATCH 1/4] cpumask: Migrate 'alloc_cpumask_var()' users to 'zalloc_cpumask_var()' Ingo Molnar <mingo@kernel.org> - 2015-12-08 05:10 +0100
Re: [PATCH 1/4] cpumask: Migrate 'alloc_cpumask_var()' users to 'zalloc_cpumask_var()' Ingo Molnar <mingo@kernel.org> - 2015-12-08 05:20 +0100
csiph-web