Re: [PATCH mm-unstable v2 1/1] fs/proc/task_mmu: avoid spurious seq_file warning on interrupted VMA lookup
From: Andrew Morton
Date: Thu Nov 19 2026 - 00:55:00 EST
On Wed, 18 Nov 2026 18:34:21 +0800 "Adrian Huang (Lenovo)" <adrianhuang0701@xxxxxxxxx> wrote:
> Commit 5631da56c9a8 ("fs/proc/task_mmu: read proc/pid/maps under
> per-vma lock") introduced the possibility of returning -EINTR from
> proc_get_vma() when a fatal signal interrupts mmap_read_lock_killable().
>
> The issue can be reproduced using stress-ng's VMA stressor, which reads
> /proc/self/maps while concurrently modifying VMAs and periodically
> terminates child processes with SIGKILL. The reproduced command is:
>
> # stress-ng --vma 0 -t 60
>
> When the VMA lookup is interrupted, proc_get_vma() returns an error
> pointer without advancing the position index. Consequently,
> seq_read_iter() emits the following rate-limited informational message:
>
> seq_file: buggy .next function m_next did not update position index
Thanks. That's just bad behavior.
> Save the current position in priv->last_pos before checking the VMA
> lookup result, allowing it to be reused by both successful and error
> paths. Advance the position index when returning an error to avoid
> the spurious warning, while preserving the original error handling.
So I'll add a cc:stable to this, target the next merge window.