Rust for Linux List
 help / color / mirror / Atom feed
From: FUJITA Tomonori <tomo@flapping.org>
To: aliceryhl@google.com, ojeda@kernel.org
Cc: a.hindborg@kernel.org, acourbot@nvidia.com,
	bjorn3_gh@protonmail.com, boqun@kernel.org, dakr@kernel.org,
	daniel.almeida@collabora.com, gary@garyguo.net,
	lossin@kernel.org, mbkchelofficialdev@gmail.com,
	tamird@kernel.org, tmgross@umich.edu, work@onurozkan.dev,
	rust-for-linux@vger.kernel.org,
	FUJITA Tomonori <fujita.tomonori@gmail.com>
Subject: [PATCH v1 0/2] rust: bug: support WARN_ON_ONCE()
Date: Tue,  1 Dec 2026 08:09:12 +0900	[thread overview]
Message-ID: <20261130230914.739923-1-tomo@flapping.org> (raw)

From: FUJITA Tomonori <fujita.tomonori@gmail.com>

This series adds warn_on_once!, the Rust version of C WARN_ON_ONCE().
Alice asked for it for the TODO in VmaRef::zap_vma_range() [1].

Patch 1 makes warn_flags! take a once flag. Patch 2 adds warn_on_once!
and a KUnit test.

Ran the KUnit test on x86_64, UML, ARM and LoongArch.

[1] https://lore.kernel.org/r/20261130141543.3699023-1-aliceryhl@google.com

FUJITA Tomonori (2):
  rust: bug: make warn_flags! take a once flag
  rust: bug: add warn_on_once!

 rust/kernel/bug.rs | 128 +++++++++++++++++++++++++++++++++------------
 1 file changed, 95 insertions(+), 33 deletions(-)


base-commit: fe6ff8d5d675c01793b9f051d16055dd4aa75244
-- 
2.43.0


             reply	other threads:[~2026-11-30 23:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30 23:09 FUJITA Tomonori [this message]
2026-11-30 23:09 ` [PATCH v1 1/2] rust: bug: make warn_flags! take a once flag FUJITA Tomonori
2026-11-30 23:09 ` [PATCH v1 2/2] rust: bug: add warn_on_once! FUJITA Tomonori

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20261130230914.739923-1-tomo@flapping.org \
    --to=tomo@flapping.org \
    --cc=a.hindborg@kernel.org \
    --cc=acourbot@nvidia.com \
    --cc=aliceryhl@google.com \
    --cc=bjorn3_gh@protonmail.com \
    --cc=boqun@kernel.org \
    --cc=dakr@kernel.org \
    --cc=daniel.almeida@collabora.com \
    --cc=fujita.tomonori@gmail.com \
    --cc=gary@garyguo.net \
    --cc=lossin@kernel.org \
    --cc=mbkchelofficialdev@gmail.com \
    --cc=ojeda@kernel.org \
    --cc=rust-for-linux@vger.kernel.org \
    --cc=tamird@kernel.org \
    --cc=tmgross@umich.edu \
    --cc=work@onurozkan.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox