summaryrefslogtreecommitdiff
path: root/Documentation/admin-guide/kernel-parameters.txt
diff options
context:
space:
mode:
authorPaul E. McKenney <paulmck@linux.ibm.com>2019-06-04 14:05:52 -0700
committerPaul E. McKenney <paulmck@linux.ibm.com>2019-08-01 14:05:51 -0700
commit1f3ebc8253ee56bfaa883c5114fb5569c56f6197 (patch)
tree2744ef2b9aa4417d00525bb50fefb930bf4af241 /Documentation/admin-guide/kernel-parameters.txt
parentb55bd585551ed2220eefdab96b31e6f935310eec (diff)
downloadlwn-1f3ebc8253ee56bfaa883c5114fb5569c56f6197.tar.gz
lwn-1f3ebc8253ee56bfaa883c5114fb5569c56f6197.zip
rcu: Restore barrier() to rcu_read_lock() and rcu_read_unlock()
Commit bb73c52bad36 ("rcu: Don't disable preemption for Tiny and Tree RCU readers") removed the barrier() calls from rcu_read_lock() and rcu_write_lock() in CONFIG_PREEMPT=n&&CONFIG_PREEMPT_COUNT=n kernels. Within RCU, this commit was OK, but it failed to account for things like get_user() that can pagefault and that can be reordered by the compiler. Lack of the barrier() calls in rcu_read_lock() and rcu_read_unlock() can cause these page faults to migrate into RCU read-side critical sections, which in CONFIG_PREEMPT=n kernels could result in too-short grace periods and arbitrary misbehavior. Please see commit 386afc91144b ("spinlocks and preemption points need to be at least compiler barriers") and Linus's commit 66be4e66a7f4 ("rcu: locking and unlocking need to always be at least barriers"), this last of which restores the barrier() call to both rcu_read_lock() and rcu_read_unlock(). This commit removes barrier() calls that are no longer needed given that the addition of them in Linus's commit noted above. The combination of this commit and Linus's commit effectively reverts commit bb73c52bad36 ("rcu: Don't disable preemption for Tiny and Tree RCU readers"). Reported-by: Herbert Xu <herbert@gondor.apana.org.au> Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Paul E. McKenney <paulmck@linux.ibm.com> [ paulmck: Fix embarrassing typo located by Alan Stern. ]
Diffstat (limited to 'Documentation/admin-guide/kernel-parameters.txt')
0 files changed, 0 insertions, 0 deletions