Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1328484 > unrolled thread
| Started by | Artem Savkov <artem.savkov@gmail.com> |
|---|---|
| First post | 2016-02-07 13:40 +0100 |
| Last post | 2016-02-07 20:50 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH] rcuperf: Do not wake up shutdown wait queue if "shutdown" is false. Artem Savkov <artem.savkov@gmail.com> - 2016-02-07 13:40 +0100
Re: [PATCH] rcuperf: Do not wake up shutdown wait queue if "shutdown" is false. "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2016-02-07 20:50 +0100
| From | Artem Savkov <artem.savkov@gmail.com> |
|---|---|
| Date | 2016-02-07 13:40 +0100 |
| Subject | [PATCH] rcuperf: Do not wake up shutdown wait queue if "shutdown" is false. |
| Message-ID | <qZwNc-68p-15@gated-at.bofh.it> |
After finishing it's 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>
---
kernel/rcu/rcuperf.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/kernel/rcu/rcuperf.c b/kernel/rcu/rcuperf.c
index 09ffa36..fb45a26 100644
--- a/kernel/rcu/rcuperf.c
+++ b/kernel/rcu/rcuperf.c
@@ -414,8 +414,10 @@ rcu_perf_writer(void *arg)
b_rcu_perf_writer_finished =
cur_ops->completed();
}
- smp_mb(); /* Assign before wake. */
- wake_up(&shutdown_wq);
+ if (shutdown) {
+ smp_mb(); /* Assign before wake. */
+ wake_up(&shutdown_wq);
+ }
}
}
if (done && !alldone &&
--
2.7.0
[toc] | [next] | [standalone]
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Date | 2016-02-07 20:50 +0100 |
| Subject | Re: [PATCH] rcuperf: Do not wake up shutdown wait queue if "shutdown" is false. |
| Message-ID | <qZDvk-2rT-11@gated-at.bofh.it> |
| In reply to | #1328484 |
On Sun, Feb 07, 2016 at 01:31:39PM +0100, Artem Savkov wrote:
> After finishing it's 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>
Good catch! Queued for testing and review.
Thanx, Paul
> ---
> kernel/rcu/rcuperf.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/kernel/rcu/rcuperf.c b/kernel/rcu/rcuperf.c
> index 09ffa36..fb45a26 100644
> --- a/kernel/rcu/rcuperf.c
> +++ b/kernel/rcu/rcuperf.c
> @@ -414,8 +414,10 @@ rcu_perf_writer(void *arg)
> b_rcu_perf_writer_finished =
> cur_ops->completed();
> }
> - smp_mb(); /* Assign before wake. */
> - wake_up(&shutdown_wq);
> + if (shutdown) {
> + smp_mb(); /* Assign before wake. */
> + wake_up(&shutdown_wq);
> + }
> }
> }
> if (done && !alldone &&
> --
> 2.7.0
>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web