diff options
| author | Arnd Bergmann <arnd@arndb.de> | 2019-07-16 15:25:57 -0800 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-07-16 18:23:21 -0800 |
| commit | a07057dce2823e10d64a2b73cefbf09d8645efe9 (patch) | |
| tree | 3db80e494d3428436e62e52fa70c449ec9368a8f /mm | |
| parent | 7b7c1df2883dd4393592859758c3e76207da8b1d (diff) | |
| download | linux-stable-a07057dce2823e10d64a2b73cefbf09d8645efe9.tar.gz linux-stable-a07057dce2823e10d64a2b73cefbf09d8645efe9.tar.bz2 linux-stable-a07057dce2823e10d64a2b73cefbf09d8645efe9.tar.xz linux-stable-a07057dce2823e10d64a2b73cefbf09d8645efe9.zip | |
mm/slab_common.c: work around clang bug #42570
Clang gets rather confused about two variables in the same special
section when one of them is not initialized, leading to an assembler
warning later:
/tmp/slab_common-18f869.s: Assembler messages:
/tmp/slab_common-18f869.s:7526: Warning: ignoring changed section attributes for .data..ro_after_init
Adding an initialization to kmalloc_caches is rather silly here
but does avoid the issue.
Link: https://bugs.llvm.org/show_bug.cgi?id=42570
Link: http://lkml.kernel.org/r/20190712090455.266021-1-arnd@arndb.de
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: David Rientjes <rientjes@google.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Roman Gushchin <guro@fb.com>
Cc: Shakeel Butt <shakeelb@google.com>
Cc: Vladimir Davydov <vdavydov.dev@gmail.com>
Cc: Andrey Konovalov <andreyknvl@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
| -rw-r--r-- | mm/slab_common.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/mm/slab_common.c b/mm/slab_common.c index 6c49dbb3769e..807490fe217a 100644 --- a/mm/slab_common.c +++ b/mm/slab_common.c | |||
| @@ -1028,7 +1028,8 @@ struct kmem_cache *__init create_kmalloc_cache(const char *name, | |||
| 1028 | } | 1028 | } |
| 1029 | 1029 | ||
| 1030 | struct kmem_cache * | 1030 | struct kmem_cache * |
| 1031 | kmalloc_caches[NR_KMALLOC_TYPES][KMALLOC_SHIFT_HIGH + 1] __ro_after_init; | 1031 | kmalloc_caches[NR_KMALLOC_TYPES][KMALLOC_SHIFT_HIGH + 1] __ro_after_init = |
| 1032 | { /* initialization for https://bugs.llvm.org/show_bug.cgi?id=42570 */ }; | ||
| 1032 | EXPORT_SYMBOL(kmalloc_caches); | 1033 | EXPORT_SYMBOL(kmalloc_caches); |
| 1033 | 1034 | ||
| 1034 | /* | 1035 | /* |
