Re: [RFC PATCH 1/2] locking: add mutex_lock_nospin()

From: Steven Rostedt

Date: Wed Mar 04 2026 - 22:02:27 EST


On Thu, 5 Mar 2026 10:33:00 +0800
Yafang Shao <laoar.shao@xxxxxxxxx> wrote:

> Other tools may also read available_filter_functions, requiring each
> one to be patched individually to avoid this flaw—a clearly
> impractical solution.

What exactly is the issue? If a task does a while 1 in user space, it
wouldn't be much different. With PREEMPT_LAZY the most a task will spin
in the kernel is one extra tick over a user space task spinning in user
space.

available_filter_functions is definitely not a hot path, so I
personally don't care if it were to use "nospin". My worry is about
adding this "special" mutex for a single corner case, and I want to know
that its a real bug before we add something special into the kernel.

-- Steve