Re: Stalls when starting a VSOCK listening socket: soft lockups, RCU stalls, timeout

Thomas Gleixner
2026-03-07T09:01:24Z

On Fri, Mar 06 2026 at 16:24, Peter Zijlstra wrote:
> On Fri, Mar 06, 2026 at 10:57:15AM +0100, Thomas Gleixner wrote:
>
>> I tried with tons of test cases which stress test mmcid with threads and
>> failed.
>
> Are some of those in tools/testing/selftests ?
>
> Anyway, I was going over that code, and I noticed that there seems to be
> inconsistent locking for mm_mm_cid::pcpu.
>
> There's a bunch of sites that state we need rq->lock for remote access;
> but then things like sched_mm_cid_fork() and sched_mm_cid_exit() seem to
> think that holding mm_cid->lock is sufficient.
>
> This doesn't make sense to me, but maybe I missed something.

fork() and exit() are fully serialized. There can't be a mode change
with remote access going on concurrently.

I gave up staring at it yesterday as my brain started to melt. Let me
try again.

Thanks,

tglx