Re: [BUG] 9p: unknown RLOCK status triggers WARN_ONCE panic with panic_on_warn

From: Dominique Martinet

Date: Thu May 28 2026 - 23:14:07 EST


Yifei Chu wrote on Sun, May 24, 2026 at 10:43:57AM -0400:
> Short version: I found that a 9P2000.L server can return an unknown RLOCK
> status byte and make the Linux 9P client hit a WARN_ONCE() in
> v9fs_file_do_lock(). With panic_on_warn=1, that turns into a reproducible
> kernel panic.

You're right we should not WARN() due to server sending us bogus data
(only on internal state bug)

Please send a patch directly next time, especially since this is trivial

I've saved us both time for this time:
https://lore.kernel.org/r/20260529-lock-warn-v1-1-20c29580d61d@xxxxxxxxxxxxx

--
Dominique