Skip to content

Update locking code to upstream 6.1 + follow up fixes

Joel Savitz requested to merge jsavitz/centos-stream-9:9.3-locking.draft3 into main
Omitted-fix: 807ff7ed34d2 ("futex: add missing rtmutex.h include")
	part of patchset not being backported: https://patchwork.freedesktop.org/series/102340/
	tiny change to locking code is only incidental

Omitted-fix: f5d39b020809 ("freezer,sched: Rewrite core freezer logic")
	changes to futex subsystem are only incidental to larger rewrite of freezer logic

Omitted-fix: e67198cc05b8 ("context_tracking: Take idle eqs entrypoints over RCU")
	part of a larger patchset implementing RCU context tracking,
	http://kerneloscope.usersys.redhat.com/series/08ab707dfc83d6ab7829c1c0f39b0d4530fa42a8/

Omitted-fix: 79dbd006a6d6 ("kmsan: disable instrumentation of unsupported common kernel code")
	part of larget patchset implementing KMSAN
	http://kerneloscope.usersys.redhat.com/series/4ca8cc8d1bbe582bfc7a4d80bd72cfd8d3d0e2e8/

Omitted-fix: 81895a65ec63 ("treewide: use prandom_u32_max() when possible, part 1")
	treewide changes to random number generation
	part of patchset: http://kerneloscope.usersys.redhat.com/series/8b3ccbc1f1f91847160951aa15dd27c22dddcb49/



Arnd Bergmann (4):
  futex: Remove futex_cmpxchg detection
  futex: Ensure futex_atomic_cmpxchg_inatomic() is present
  futex: Fix sparc32/m68k/nds32 build regression
  futex: Fix additional regressions

Guo Jin (1):
  locking: Fix qspinlock/x86 inline asm error

Joel Savitz (1):
  Revert "locking/rwsem: Conditionally wake waiters in reader/writer
    slowpaths"

Mathieu Desnoyers (1):
  futex: Fix futex_waitv() hrtimer debug object leak on kcalloc error

Namhyung Kim (2):
  locking: Apply contention tracepoints in the slow path
  locking: Add __lockfunc to slow path functions

Peter Zijlstra (1):
  locking/mutex: Make contention tracepoints more consistent wrt
    adaptive spinning

Sebastian Andrzej Siewior (1):
  futex: Remove a PREEMPT_RT_FULL reference.

Tetsuo Handa (1):
  locking/lockdep: Print more debug information - report name and key
    when look_up_lock_class() got confused

Waiman Long (9):
  locking/rwsem: Make handoff bit handling more consistent
  locking/rwsem: Conditionally wake waiters in reader/writer slowpaths
  locking/rwsem: No need to check for handoff bit if wait queue empty
  locking/rwsem: Always try to wake waiters in out_nolock path
  locking/qrwlock: Change "queue rwlock" to "queued rwlock"
  locking/rwsem: Allow slowpath writer to ignore handoff bit if not set
    by first waiter
  locking/rwsem: Prevent non-first waiter from spinning in down_write()
    slowpath
  locking/rwsem: Disable preemption in all down_read*() and up_read()
    code paths
  locking/rwsem: Disable preemption in all down_write*() and up_write()
    code paths

Wander Lairson Costa (1):
  rtmutex: Ensure that the top waiter is always woken up

Xiu Jianfeng (1):
  lockdep: Use memset_startat() helper in reinit_class()

tangmeng (1):
  kernel/lockdep: move lockdep sysctls to its own file

 arch/arc/Kconfig                          |   1 -
 arch/arm64/Kconfig                        |   1 -
 arch/csky/Kconfig                         |   1 -
 arch/m68k/Kconfig                         |   1 -
 arch/mips/include/asm/futex.h             |  27 +-
 arch/riscv/Kconfig                        |   1 -
 arch/s390/Kconfig                         |   1 -
 arch/sh/Kconfig                           |   1 -
 arch/um/Kconfig                           |   1 -
 arch/um/kernel/skas/uaccess.c             |   1 -
 arch/x86/include/asm/qspinlock_paravirt.h |  13 +-
 arch/xtensa/Kconfig                       |   1 -
 arch/xtensa/include/asm/futex.h           |   8 +-
 include/asm-generic/futex.h               |  31 +--
 include/asm-generic/qrwlock.h             |  28 +-
 include/asm-generic/qrwlock_types.h       |   2 +-
 include/linux/lockdep.h                   |   4 -
 include/trace/events/lock.h               |   4 +-
 init/Kconfig                              |   9 +-
 kernel/futex/core.c                       |  35 ---
 kernel/futex/futex.h                      |   6 -
 kernel/futex/pi.c                         |   2 +-
 kernel/futex/syscalls.c                   |  33 +--
 kernel/locking/lockdep.c                  |  46 +++-
 kernel/locking/mutex.c                    |  15 +-
 kernel/locking/percpu-rwsem.c             |   5 +
 kernel/locking/qrwlock.c                  |  21 +-
 kernel/locking/qspinlock.c                |   7 +-
 kernel/locking/qspinlock_paravirt.h       |   4 +-
 kernel/locking/rtmutex.c                  |  16 +-
 kernel/locking/rwbase_rt.c                |   7 +
 kernel/locking/rwsem.c                    | 311 +++++++++++++---------
 kernel/locking/semaphore.c                |  15 +-
 kernel/sysctl.c                           |  21 --
 34 files changed, 366 insertions(+), 314 deletions(-)

-- 
2.31.1

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2176147 Signed-off-by: Joel Savitz jsavitz@redhat.com

Merge request reports