Rust for Linux List
 help / color / mirror / Atom feed
* [PATCH v1 0/2] rust: bug: support WARN_ON_ONCE()
@ 2026-11-30 23:09 FUJITA Tomonori
  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
  0 siblings, 2 replies; 3+ messages in thread
From: FUJITA Tomonori @ 2026-11-30 23:09 UTC (permalink / raw)
  To: aliceryhl, ojeda
  Cc: a.hindborg, acourbot, bjorn3_gh, boqun, dakr, daniel.almeida,
	gary, lossin, mbkchelofficialdev, tamird, tmgross, work,
	rust-for-linux, FUJITA Tomonori

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-11-30 23:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-30 23:09 [PATCH v1 0/2] rust: bug: support WARN_ON_ONCE() FUJITA Tomonori
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox