Skip to contentSkip to conversation

locking changes for v5.7

GIT PULL Merged Ingo Molnar 2 participants 2 messages Mar 30, 2020 – Mar 31, 2020

lore
Share & tools
lore
#0 lore raw

Linus,

Please pull the latest locking-core-for-linus git tree from:

git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git locking-core-for-linus

# HEAD: f1e67e355c2aafeddf1eac31335709236996d2fe fs/buffer: Make BH_Uptodate_Lock bit_spin_lock a regular spinlock_t

The main changes in this cycle were:

- Continued user-access cleanups in the futex code.

- percpu-rwsem rewrite that uses its own waitqueue and atomic_t instead of an embedded rwsem. This addresses a couple of weaknesses, but the primary motivation was complications on the -rt kernel.

- Introduce raw lock nesting detection on lockdep (CONFIG_PROVE_RAW_LOCK_NESTING=y), document the raw_lock vs. normal lock differences. This too originates from -rt.

- Reuse lockdep zapped chain_hlocks entries, to conserve RAM footprint on distro-ish kernels running into the "BUG: MAX_LOCKDEP_CHAIN_HLOCKS too low!" depletion of the lockdep chain-entries pool.

- Misc cleanups, smaller fixes and enhancements - see the changelog for details.

Thanks,

Ingo

------------------>
Al Viro (8):
futex: arch_futex_atomic_op_inuser() calling conventions change
sh: no need of access_ok() in arch_futex_atomic_op_inuser() [parisc, s390, sparc64] no need for access_ok() in futex handling
objtool: whitelist __sanitizer_cov_trace_switch()
x86: convert arch_futex_atomic_op_inuser() to user_access_begin/user_access_end()
x86: don't reload after cmpxchg in unsafe_atomic_op2() loop
generic arch_futex_atomic_op_inuser() doesn't need access_ok()
x86: get rid of user_atomic_cmpxchg_inatomic()

Boqun Feng (1):
locking/lockdep: Avoid recursion in lockdep_count_{for,back}ward_deps()

Clark Williams (1):
thermal/x86_pkg_temp: Make pkg_temp_lock a raw_spinlock_t

Davidlohr Bueso (2):
locking/percpu-rwsem: Fold __percpu_up_read() locking/percpu-rwsem: Add might_sleep() for writer locking

Logan Gunthorpe (1):
PCI/switchtec: Fix init_completion race condition with poll_wait()

Peter Zijlstra (13):
locking/percpu-rwsem, lockdep: Make percpu-rwsem use its own lockdep_map locking/percpu-rwsem: Convert to bool
locking/percpu-rwsem: Move __this_cpu_inc() into the slowpath locking/percpu-rwsem: Extract __percpu_down_read_trylock() locking/percpu-rwsem: Remove the embedded rwsem locking/rwsem: Remove RWSEM_OWNER_UNKNOWN
futex: Remove pointless mmgrap() + mmdrop()
futex: Remove {get,drop}_futex_key_refs()
locking/lockdep: Fix bad recursion pattern
locking/lockdep: Rework lockdep_lock
lockdep: Teach lockdep about "USED" <- "IN-NMI" inversions
acpi: Remove header dependency
lockdep: Introduce wait-type checks

Peter Zijlstra (Intel) (2):
rcuwait: Add @state argument to rcuwait_wait_event() powerpc/ps3: Convert half completion to rcuwait

Randy Dunlap (1):
Documentation/locking/locktypes: Minor copy editor fixes

Sebastian Andrzej Siewior (9):
pci/switchtec: Replace completion wait queue usage for poll
nds32: Remove mm.h from asm/uaccess.h
csky: Remove mm.h from asm/uaccess.h
hexagon: Remove mm.h from asm/uaccess.h
ia64: Remove mm.h from asm/uaccess.h
microblaze: Remove mm.h from asm/uaccess.h
lockdep: Add hrtimer context tracing bits
lockdep: Annotate irq_work
lockdep: Add posixtimer context tracing bits

Sebastian Siewior (1):
completion: Use lockdep_assert_RT_in_threaded_ctx() in complete_all()

Thomas Gleixner (9):
usb: gadget: Use completion interface instead of open coding it
orinoco_usb: Use the regular completion interfaces
Documentation: Add lock ordering and nesting documentation
timekeeping: Split jiffies seqlock
sched/swait: Prepare usage in completions
completion: Use simple wait queues
m68knommu: Remove mm.h include from uaccess_no.h Documentation/locking/locktypes: Further clarifications and wordsmithing fs/buffer: Make BH_Uptodate_Lock bit_spin_lock a regular spinlock_t

Waiman Long (6):
locking/lockdep: Decrement IRQ context counters when removing lock chain locking/lockdep: Display irq_context names in /proc/lockdep_chains locking/lockdep: Track number of zapped classes locking/lockdep: Throw away all lock chains with zapped class locking/lockdep: Track number of zapped lock chains locking/lockdep: Reuse freed chain_hlocks entries

Will Deacon (1):
asm-generic/bitops: Update stale comment

 Documentation/locking/index.rst                    |   1 +
 Documentation/locking/locktypes.rst                | 347 +++++++++++
 arch/alpha/include/asm/futex.h                     |   5 +-
 arch/arc/include/asm/futex.h                       |   5 +-
 arch/arm/include/asm/futex.h                       |   5 +-
 arch/arm64/include/asm/futex.h                     |   5 +-
 arch/csky/include/asm/uaccess.h                    |   1 -
 arch/hexagon/include/asm/futex.h                   |   5 +-
 arch/hexagon/include/asm/uaccess.h                 |   1 -
 arch/ia64/include/asm/futex.h                      |   5 +-
 arch/ia64/include/asm/uaccess.h                    |   1 -
 arch/ia64/kernel/process.c                         |   1 +
 arch/ia64/mm/ioremap.c                             |   1 +
 arch/m68k/include/asm/uaccess_no.h                 |   1 -
 arch/microblaze/include/asm/futex.h                |   5 +-
 arch/microblaze/include/asm/uaccess.h              |   1 -
 arch/mips/include/asm/futex.h                      |   5 +-
 arch/nds32/include/asm/futex.h                     |   6 +-
 arch/nds32/include/asm/uaccess.h                   |   1 -
 arch/openrisc/include/asm/futex.h                  |   5 +-
 arch/parisc/include/asm/futex.h                    |   2 -
 arch/powerpc/include/asm/futex.h                   |   5 +-
 arch/powerpc/platforms/ps3/device-init.c           |  18 +-
 arch/riscv/include/asm/futex.h                     |   5 +-
 arch/s390/include/asm/futex.h                      |   2 -
 arch/sh/include/asm/futex.h                        |   4 -
 arch/sparc/include/asm/futex_64.h                  |   4 -
 arch/x86/include/asm/futex.h                       |  99 +--
 arch/x86/include/asm/uaccess.h                     |  93 ---
 arch/xtensa/include/asm/futex.h                    |   5 +-
 .../net/wireless/intersil/orinoco/orinoco_usb.c    |  21 +-
 drivers/pci/switch/switchtec.c                     |  22 +-
 drivers/platform/x86/dell-smo8800.c                |   1 +
 drivers/platform/x86/wmi.c                         |   1 +
 .../intel/int340x_thermal/acpi_thermal_rel.c       |   1 +
 drivers/thermal/intel/x86_pkg_temp_thermal.c       |  24 +-
 drivers/usb/gadget/function/f_fs.c                 |   2 +-
 drivers/usb/gadget/legacy/inode.c                  |   4 +-
 fs/buffer.c                                        |  19 +-
 fs/ext4/page-io.c                                  |   8 +-
 fs/ntfs/aops.c                                     |   9 +-
 include/acpi/acpi_bus.h                            |   2 +-
 include/asm-generic/bitops.h                       |   5 +-
 include/asm-generic/futex.h                        |   2 -
 include/linux/buffer_head.h                        |   6 +-
 include/linux/completion.h                         |   8 +-
 include/linux/irq_work.h                           |   2 +
 include/linux/irqflags.h                           |  48 +-
 include/linux/lockdep.h                            |  86 ++-
 include/linux/mutex.h                              |   7 +-
 include/linux/percpu-rwsem.h                       |  83 +--
 include/linux/rcuwait.h                            |  12 +-
 include/linux/rwlock_types.h                       |   6 +-
 include/linux/rwsem.h                              |  12 +-
 include/linux/sched.h                              |   2 +
 include/linux/spinlock.h                           |  35 +-
 include/linux/spinlock_types.h                     |  24 +-
 include/linux/wait.h                               |   1 +
 kernel/cpu.c                                       |   4 +-
 kernel/exit.c                                      |   1 +
 kernel/futex.c                                     | 107 +---
 kernel/irq/handle.c                                |   7 +
 kernel/irq_work.c                                  |   2 +
 kernel/locking/lockdep.c                           | 674 +++++++++++++++++----
 kernel/locking/lockdep_internals.h                 |  14 +-
 kernel/locking/lockdep_proc.c                      |  31 +-
 kernel/locking/mutex-debug.c                       |   2 +-
 kernel/locking/percpu-rwsem.c                      | 194 ++++--
 kernel/locking/rwsem.c                             |   9 +-
 kernel/locking/rwsem.h                             |  10 -
 kernel/locking/spinlock_debug.c                    |   6 +-
 kernel/rcu/tree.c                                  |   1 +
 kernel/rcu/update.c                                |  24 +-
 kernel/sched/completion.c                          |  36 +-
 kernel/sched/sched.h                               |   3 +
 kernel/sched/swait.c                               |  15 +-
 kernel/time/hrtimer.c                              |   6 +-
 kernel/time/jiffies.c                              |   7 +-
 kernel/time/posix-cpu-timers.c                     |   6 +-
 kernel/time/tick-common.c                          |  10 +-
 kernel/time/tick-sched.c                           |  20 +-
 kernel/time/timekeeping.c                          |   6 +-
 kernel/time/timekeeping.h                          |   3 +-
 lib/Kconfig.debug                                  |  17 +
 tools/objtool/check.c                              |   1 +
 85 files changed, 1611 insertions(+), 702 deletions(-)
 create mode 100644 Documentation/locking/locktypes.rst
merge bot Merged
#1 lore raw
The pull request you sent on Mon, 30 Mar 2020 17:18:40 +0200:

The pull request you sent on Mon, 30 Mar 2020 17:18:40 +0200:

Quoted 1 line

git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git locking-core-for-linus

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/4b9fd8a829a1eec7442e38afff21d610604de56a

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.wiki.kernel.org/userdoc/prtracker