Messages in this thread | | | Date | Wed, 21 Sep 2022 10:33:17 +0200 | From | Peter Zijlstra <> | Subject | Re: [PATCH v2] locking/qspinlock: Do spin-wait in slowpath if preemptible |
| |
On Tue, Sep 20, 2022 at 03:55:42PM -0400, Waiman Long wrote: > There are some code paths in the kernel where arch_spin_lock() will be > called directly when the lock isn't expected to be contended and critical > section is short. For example, tracing_saved_cmdlines_size_read() > in kernel/trace/trace.c does that. > > In most cases, preemption is also not disabled. This creates a problem > for the qspinlock slowpath which expects preemption to be disabled
Using arch_spin_lock() without disabling preemption is a straight up bug. Don't work around that.
| |