[tip: sched/core] sched/wait: fix ___wait_var_event(exclusive)

From: tip-bot2 for Oleg Nesterov
Date: Tue Dec 17 2019 - 07:40:21 EST


The following commit has been merged into the sched/core branch of tip:

Commit-ID: cde65194502778665c1b52afc5722cf7dbfaa399
Gitweb: https://git.kernel.org/tip/cde65194502778665c1b52afc5722cf7dbfaa399
Author: Oleg Nesterov <oleg@xxxxxxxxxx>
AuthorDate: Tue, 10 Dec 2019 20:19:03 +01:00
Committer: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
CommitterDate: Tue, 17 Dec 2019 13:32:50 +01:00

sched/wait: fix ___wait_var_event(exclusive)

init_wait_var_entry() forgets to initialize wq_entry->flags.

Currently not a problem, we don't have wait_var_event_exclusive().

Signed-off-by: Oleg Nesterov <oleg@xxxxxxxxxx>
Signed-off-by: Peter Zijlstra (Intel) <peterz@xxxxxxxxxxxxx>
Cc: Vincent Guittot <vincent.guittot@xxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Cc: Felipe Balbi <balbi@xxxxxxxxxx>
Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Cc: Miklos Szeredi <miklos@xxxxxxxxxx>
Cc: Juri Lelli <juri.lelli@xxxxxxxxxx>
Link: https://lkml.kernel.org/r/20191210191902.GB14449@xxxxxxxxxx
---
kernel/sched/wait_bit.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/kernel/sched/wait_bit.c b/kernel/sched/wait_bit.c
index 45eba18..02ce292 100644
--- a/kernel/sched/wait_bit.c
+++ b/kernel/sched/wait_bit.c
@@ -179,6 +179,7 @@ void init_wait_var_entry(struct wait_bit_queue_entry *wbq_entry, void *var, int
.bit_nr = -1,
},
.wq_entry = {
+ .flags = flags,
.private = current,
.func = var_wake_function,
.entry = LIST_HEAD_INIT(wbq_entry->wq_entry.entry),