Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'locking-urgent-2023-09-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull locking fixes from Ingo Molnar:
"Fix a include/linux/atomic/atomic-arch-fallback.h breakage that
generated incorrect code, and fix a lockdep reporting race that may
result in lockups"

* tag 'locking-urgent-2023-09-22' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
locking/seqlock: Do the lockdep annotation before locking in do_write_seqcount_begin_nested()
locking/atomic: scripts: fix fallback ifdeffery

+3 -11
+1 -9
include/linux/atomic/atomic-arch-fallback.h
··· 459 459 { 460 460 #if defined(arch_atomic_read_acquire) 461 461 return arch_atomic_read_acquire(v); 462 - #elif defined(arch_atomic_read) 463 - return arch_atomic_read(v); 464 462 #else 465 463 int ret; 466 464 ··· 506 508 { 507 509 #if defined(arch_atomic_set_release) 508 510 arch_atomic_set_release(v, i); 509 - #elif defined(arch_atomic_set) 510 - arch_atomic_set(v, i); 511 511 #else 512 512 if (__native_word(atomic_t)) { 513 513 smp_store_release(&(v)->counter, i); ··· 2571 2575 { 2572 2576 #if defined(arch_atomic64_read_acquire) 2573 2577 return arch_atomic64_read_acquire(v); 2574 - #elif defined(arch_atomic64_read) 2575 - return arch_atomic64_read(v); 2576 2578 #else 2577 2579 s64 ret; 2578 2580 ··· 2618 2624 { 2619 2625 #if defined(arch_atomic64_set_release) 2620 2626 arch_atomic64_set_release(v, i); 2621 - #elif defined(arch_atomic64_set) 2622 - arch_atomic64_set(v, i); 2623 2627 #else 2624 2628 if (__native_word(atomic64_t)) { 2625 2629 smp_store_release(&(v)->counter, i); ··· 4649 4657 } 4650 4658 4651 4659 #endif /* _LINUX_ATOMIC_FALLBACK_H */ 4652 - // 202b45c7db600ce36198eb1f1fc2c2d5268ace2d 4660 + // 2fdd6702823fa842f9cea57a002e6e4476ae780c
+1 -1
include/linux/seqlock.h
··· 512 512 513 513 static inline void do_write_seqcount_begin_nested(seqcount_t *s, int subclass) 514 514 { 515 - do_raw_write_seqcount_begin(s); 516 515 seqcount_acquire(&s->dep_map, subclass, 0, _RET_IP_); 516 + do_raw_write_seqcount_begin(s); 517 517 } 518 518 519 519 /**
+1 -1
scripts/atomic/gen-atomic-fallback.sh
··· 102 102 fi 103 103 104 104 # Allow ACQUIRE/RELEASE/RELAXED ops to be defined in terms of FULL ops 105 - if [ ! -z "${order}" ]; then 105 + if [ ! -z "${order}" ] && ! meta_is_implicitly_relaxed "${meta}"; then 106 106 printf "#elif defined(arch_${basename})\n" 107 107 printf "\t${retstmt}arch_${basename}(${args});\n" 108 108 fi