Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1565350
| From | David Rientjes <rientjes@google.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] mm: ensure alloc_flags in slow path are initialized |
| Date | 2017-01-24 00:00 +0100 |
| Message-ID | <t2VKG-48m-17@gated-at.bofh.it> (permalink) |
| References | <t2LLk-6l3-15@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, 23 Jan 2017, Arnd Bergmann wrote:
> The __alloc_pages_slowpath() has gotten rather complex and gcc
> is no longer able to follow the gotos and prove that the
> alloc_flags variable is initialized at the time it is used:
>
> mm/page_alloc.c: In function '__alloc_pages_slowpath':
> mm/page_alloc.c:3565:15: error: 'alloc_flags' may be used uninitialized in this function [-Werror=maybe-uninitialized]
>
> To be honest, I can't figure that out either, maybe it is or
> maybe not, but moving the existing initialization up a little
> higher looks safe and makes it obvious to both me and gcc that
> the initialization comes before the first use.
>
> Fixes: 74eaa4a97e8e ("mm: consolidate GFP_NOFAIL checks in the allocator slowpath")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: David Rientjes <rientjes@google.com>
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] mm: ensure alloc_flags in slow path are initialized Arnd Bergmann <arnd@arndb.de> - 2017-01-23 13:20 +0100
Re: [PATCH] mm: ensure alloc_flags in slow path are initialized Vlastimil Babka <vbabka@suse.cz> - 2017-01-23 14:00 +0100
Re: [PATCH] mm: ensure alloc_flags in slow path are initialized Arnd Bergmann <arnd@arndb.de> - 2017-01-23 17:10 +0100
Re: [PATCH] mm: ensure alloc_flags in slow path are initialized David Rientjes <rientjes@google.com> - 2017-01-24 00:00 +0100
Re: [PATCH] mm: ensure alloc_flags in slow path are initialized Andrew Morton <akpm@linux-foundation.org> - 2017-01-24 01:00 +0100
Re: [PATCH] mm: ensure alloc_flags in slow path are initialized Vlastimil Babka <vbabka@suse.cz> - 2017-01-24 10:20 +0100
csiph-web