With CONFIG_INIT_STACK_ALL enabled, the local __wq_entry is initialized twice. Because Clang is currently unable to optimize the automatic initialization away (init_wait_entry() is defined in another translation unit), remove it with the __do_not_initialize annotation. Cc: Kees Cook <keescook@xxxxxxxxxxxx> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> Signed-off-by: Alexander Potapenko <glider@xxxxxxxxxx> --- include/linux/wait.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/wait.h b/include/linux/wait.h index 3283c8d021377..03b831ee9b64a 100644 --- a/include/linux/wait.h +++ b/include/linux/wait.h @@ -262,7 +262,8 @@ extern void init_wait_entry(struct wait_queue_entry *wq_entry, int flags); #define ___wait_event(wq_head, condition, state, exclusive, ret, cmd) \ ({ \ __label__ __out; \ - struct wait_queue_entry __wq_entry; \ + /* Unconditionally initialized by init_wait_entry(). */ \ + struct wait_queue_entry __wq_entry __do_not_initialize; \ long __ret = ret; /* explicit shadow */ \ \ init_wait_entry(&__wq_entry, exclusive ? WQ_FLAG_EXCLUSIVE : 0); \ -- 2.25.0.265.gbab2e86ba0-goog _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel