[PATCH v1] rust: bug: update the SAFETY comment for warn_slowpath_fmt() on UML
Miguel Ojeda
miguel.ojeda.sandonis at gmail.com
Mon Oct 12 08:35:21 PDT 2026
On Fri, Oct 2, 2026 at 12:46 PM FUJITA Tomonori <tomo at flapping.org> wrote:
>
> From: FUJITA Tomonori <fujita.tomonori at gmail.com>
>
> The SAFETY comment says that it is always safe to call
> `warn_slowpath_fmt()` with a valid null-terminated string. This is not
> true. The taint argument must also be a valid taint number.
> Commit 951d09ca450c ("rust: bug: pass TAINT_WARN to warn_slowpath_fmt()
> on UML") fixed a bug where it was not.
>
> List each condition that the call meets: the file name, the taint
> number, and the null `fmt`.
>
> Suggested-by: Miguel Ojeda <ojeda at kernel.org>
> Signed-off-by: FUJITA Tomonori <fujita.tomonori at gmail.com>
Applied to `rust-next` -- thanks!
I added:
Cc: stable at vger.kernel.org
Fixes: dff64b072708 ("rust: Add warn_on macro")
so that this goes together with the other one that actually fixes the
issue. It is not really a user-facing fix, but it seems to me that it
makes sense to put them together and to avoid a de-sync in the
comment.
Cheers,
Miguel
More information about the linux-um
mailing list