UPSTREAM: lib/test_meminit.c: fix -Wmaybe-uninitialized false positive
Upstream commit d3a811617ae6 ("lib/test_meminit.c: fix
-Wmaybe-uninitialized false positive").
The conditional logic is too complicated for the compiler to fully
comprehend:
lib/test_meminit.c: In function 'test_meminit_init':
lib/test_meminit.c:236:5: error: 'buf_copy' may be used uninitialized in this function [-Werror=maybe-uninitialized]
kfree(buf_copy);
^~~~~~~~~~~~~~~
lib/test_meminit.c:201:14: note: 'buf_copy' was declared here
Simplify it by splitting out the non-rcu section.
Link: http://lkml.kernel.org/r/20190617131210.2190280-1-arnd@arndb.de
Fixes: af734ee6ec85 ("lib: introduce test_meminit module")
Signed-off-by:
Arnd Bergmann <arnd@arndb.de>
Acked-by:
Alexander Potapenko <glider@google.com>
Signed-off-by:
Andrew Morton <akpm@linux-foundation.org>
Signed-off-by:
Linus Torvalds <torvalds@linux-foundation.org>
Change-Id: I810a4b8f115f387c8ffe30937ac1225849520132
Bug: 138435492
Test: Boot cuttlefish with and without
Test: CONFIG_INIT_ON_ALLOC_DEFAULT_ON/CONFIG_INIT_ON_FREE_DEFAULT_ON
Signed-off-by:
Alexander Potapenko <glider@google.com>
Loading
Please register or sign in to comment