public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: linux-kernel@vger.kernel.org, mingo@kernel.org,
	jiangshanlai@gmail.com, dipankar@in.ibm.com,
	akpm@linux-foundation.org, mathieu.desnoyers@efficios.com,
	josh@joshtriplett.org, tglx@linutronix.de, rostedt@goodmis.org,
	dhowells@redhat.com, edumazet@google.com, dvhart@linux.intel.com,
	fweisbec@gmail.com, oleg@redhat.com, bobby.prani@gmail.com
Subject: Re: [PATCH tip/core/rcu 09/12] rcu: Make call_rcu_tasks() tolerate first call with irqs disabled
Date: Thu, 16 Jun 2016 00:16:04 +0200	[thread overview]
Message-ID: <20160615221604.GC30921@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <1466027173-5501-9-git-send-email-paulmck@linux.vnet.ibm.com>

On Wed, Jun 15, 2016 at 02:46:10PM -0700, Paul E. McKenney wrote:
> Currently, if the very first call to call_rcu_tasks() has irqs disabled,
> it will create the rcu_tasks_kthread with irqs disabled, which will
> result in a splat in the memory allocator, which kthread_run() invokes
> with the expectation that irqs are enabled.
> 
> This commit fixes this problem by deferring kthread creation if called
> with irqs disabled.  The first call to call_rcu_tasks() that has irqs
> enabled will create the kthread.
> 
> This bug was detected by rcutorture changes that were motivated by
> Iftekhar Ahmed's mutation-testing efforts.

Seems fragile. What if someone manages to only use call_rcu_tasks() with
IRQs disabled?

  parent reply	other threads:[~2016-06-15 22:16 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-15 21:45 [PATCH tip/core/rcu 0/12] Miscellaneous RCU fixes for 4.8 Paul E. McKenney
2016-06-15 21:46 ` [PATCH tip/core/rcu 01/12] rcu: Fix outdated rcu_scheduler_active comment Paul E. McKenney
2016-06-15 21:46 ` [PATCH tip/core/rcu 02/12] rcu: Fix outdated hotplug-exclusion comment in rcu_gp_init() Paul E. McKenney
2016-06-15 21:46 ` [PATCH tip/core/rcu 03/12] rcu: Remove some superfluous lines Paul E. McKenney
2016-06-15 21:46 ` [PATCH tip/core/rcu 04/12] rcu: Move expedited code from tree.c to tree_exp.h Paul E. McKenney
2016-06-15 22:05   ` Peter Zijlstra
2016-06-15 22:16     ` Paul E. McKenney
2016-06-17 15:48   ` Pranith Kumar
2016-06-17 17:46     ` Paul E. McKenney
2016-06-15 21:46 ` [PATCH tip/core/rcu 05/12] rcu: Move expedited code from tree_plugin.h " Paul E. McKenney
2016-06-15 21:46 ` [PATCH tip/core/rcu 06/12] rcu: Document RCU_NONIDLE() restrictions in comment header Paul E. McKenney
2016-06-15 21:46 ` [PATCH tip/core/rcu 07/12] rcu: No ordering for rcu_assign_pointer() of NULL Paul E. McKenney
2016-06-15 22:03   ` Peter Zijlstra
2016-06-15 22:12     ` Peter Zijlstra
2016-06-15 22:41       ` Paul E. McKenney
2016-06-15 21:46 ` [PATCH tip/core/rcu 08/12] rcu: Disable TASKS_RCU for usermode Linux Paul E. McKenney
2016-06-15 21:47   ` Richard Weinberger
2016-06-15 21:46 ` [PATCH tip/core/rcu 09/12] rcu: Make call_rcu_tasks() tolerate first call with irqs disabled Paul E. McKenney
2016-06-15 22:15   ` Peter Zijlstra
2016-06-15 22:54     ` Paul E. McKenney
2016-06-15 22:16   ` Peter Zijlstra [this message]
2016-06-15 22:58     ` Paul E. McKenney
2016-06-15 21:46 ` [PATCH tip/core/rcu 10/12] rcu: Fix a typo in a comment Paul E. McKenney
2016-06-15 21:46 ` [PATCH tip/core/rcu 11/12] rcu: sysctl: Panic on RCU Stall Paul E. McKenney
2016-06-15 21:46 ` [PATCH tip/core/rcu 12/12] rcu: Correctly handle sparse possible cpus Paul E. McKenney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160615221604.GC30921@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=bobby.prani@gmail.com \
    --cc=dhowells@redhat.com \
    --cc=dipankar@in.ibm.com \
    --cc=dvhart@linux.intel.com \
    --cc=edumazet@google.com \
    --cc=fweisbec@gmail.com \
    --cc=jiangshanlai@gmail.com \
    --cc=josh@joshtriplett.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@efficios.com \
    --cc=mingo@kernel.org \
    --cc=oleg@redhat.com \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox