[PATCH tip/core/rcu 0/15]

Paul E. McKenney
2020-09-28T23:30:49Z

Hello!

This is a repost of Thomas Gleixner's "Make preempt count unconditional"
series [1], but with the addition of a kvfree_rcu() bug-fix patch making
use of this PREEMPT_COUNT addition. This series is intended for the
upcoming v5.10 merge window.

This addition fixes the -rt bug reported by Sebastian Andrzej Siewior
[2]. Please note that with the advent of the new lockdep Kconfig
option CONFIG_PROVE_RAW_LOCK_NESTING, this is now also a mainline bug.
In happy contrast to the surprisingly large number of earlier versions
of this fix, this version uses only pre-existing kernel interfaces,
and furthermore uses them in conventional ways.

1-13. Thomas's series [1].

14. Use the newly accurate preemptible() macro to cause kvfree_rcu()
to do its allocations only when it is safe to do so, even in
CONFIG_PREEMPT_NONE=y kernels, courtesy of Uladzislau Rezki.
Again, this fixes the bug reported by Sebastian [2].

15. Checkpatch fix removing NULL check guarding kfree(), courtesy
of kernel test robot and Julia Lawall.

In addition, this series reduces the size of the kernel by 100 lines
of code, about two thirds of which is from Thomas's original series and
the remaining one third from the bug fix.

Changes from v1 [1]:

o Fix trivial !SMP build failure.
o Apply checkpatch spelling suggestions.

Thanx, Paul

[1] https://lore.kernel.org/linux-mm/20200914204209.256266093@linutronix.de/
[2] https://lore.kernel.org/lkml/20200630164543.4mdcf6zb4zfclhln@linutronix.de/

------------------------------------------------------------------------

arch/arm/include/asm/assembler.h | 11 -
arch/arm/kernel/iwmmxt.S | 2
arch/arm/mach-ep93xx/crunch-bits.S | 2
arch/xtensa/kernel/entry.S | 2
drivers/gpu/drm/i915/Kconfig.debug | 1
drivers/gpu/drm/i915/i915_utils.h | 3
include/linux/bit_spinlock.h | 4
include/linux/lockdep.h | 6
include/linux/pagemap.h | 4
include/linux/preempt.h | 37 -----
include/linux/uaccess.h | 6
kernel/Kconfig.preempt | 6
kernel/rcu/tree.c | 73 ++--------
kernel/sched/core.c | 6
lib/Kconfig.debug | 5
tools/testing/selftests/rcutorture/configs/rcu/SRCU-t | 1
tools/testing/selftests/rcutorture/configs/rcu/SRCU-u | 1
tools/testing/selftests/rcutorture/configs/rcu/TINY01 | 1
tools/testing/selftests/rcutorture/doc/TINY_RCU.txt | 5
tools/testing/selftests/rcutorture/doc/TREE_RCU-kconfig.txt | 1
tools/testing/selftests/rcutorture/formal/srcu-cbmc/src/config.h | 1
21 files changed, 39 insertions(+), 139 deletions(-)