[PATCH RESEND v2 13/51] sched/psi: don't drop the last byte of a trigger write

sashiko-bot at kernel.org sashiko-bot at kernel.org
Thu Nov 5 11:29:13 PST 2026


> psi_write() copies at most 32 bytes of the write into its buffer and
> terminates the buffer by overwriting its last byte. For a write shorter
> than 32 bytes that is the last byte the writer sent. A trigger written
> without a trailing newline loses its last digit then, "some 150000
> 1000000" turns into "some 150000 100000", and a shorter one like
> "some 150 10000" fails with -EINVAL because the window doesn't fit
> anymore. Only writes that end in a newline parse as intended.
> 
> Copy at most 31 bytes and terminate behind them.
> 
> Fixes: 0e94682b73bf ("psi: introduce psi monitor")
> Cc: stable at vger.kernel.org
> Signed-off-by: Christian Brauner (Amutable) <brauner at kernel.org>

Sashiko has reviewed this patch and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261104-work-procfs-bugfixes-v2-0-021c84d852e0@kernel.org?part=13




More information about the kexec mailing list