mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-23 08:35:19 -05:00
rcuperf: Do not wake up shutdown wait queue if "shutdown" is false.
After finishing its tests rcuperf tries to wake up shutdown_wq even if "shutdown" param is set to false, resulting in a wake_up() call on an unitialized wait_queue_head_t which leads to "BUG: spinlock bad magic" and "BUG: unable to handle kernel NULL pointer dereference". Fix by checking "shutdown" param before waking up the queue. Signed-off-by: Artem Savkov <artem.savkov@gmail.com>
This commit is contained in:
parent
dba6f1bab8
commit
e6fb1fc108
1 changed files with 4 additions and 2 deletions
|
@ -423,8 +423,10 @@ rcu_perf_writer(void *arg)
|
||||||
b_rcu_perf_writer_finished =
|
b_rcu_perf_writer_finished =
|
||||||
cur_ops->completed();
|
cur_ops->completed();
|
||||||
}
|
}
|
||||||
smp_mb(); /* Assign before wake. */
|
if (shutdown) {
|
||||||
wake_up(&shutdown_wq);
|
smp_mb(); /* Assign before wake. */
|
||||||
|
wake_up(&shutdown_wq);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (done && !alldone &&
|
if (done && !alldone &&
|
||||||
|
|
Loading…
Add table
Reference in a new issue