Re: [PATCH v4 0/4] rust: introduce DropGuard

From: Andreas Hindborg

Date: Mon Sep 28 2026 - 05:49:19 EST


"Mohamed Osama" <mohamed.osama189110@xxxxxxxxx> writes:

> This series adds the Rust kernel DropGuard API and migrates existing
> cleanup guards in the block, serdev, and locking code to use it.
>
> DropGuard is vendored from the Rust standard library and re-exported
> through kernel::mem.
>
> Changes since v3:
> - Vendor DropGuard in rust/kernel/std_vendor.rs and re-export it from
> kernel::mem, following Gary Guo's review.
> - Remove the DropGuard KUnit tests and Kconfig option since the
> implementation is vendored from the standard library.
> - Keep the existing ScopeGuard API unchanged.


Could you allow for at least 24 hours to pass between new versions of
your patches?

40 mins. ago [10/10] Mohamed Osama, sashiko-bot@xxxxxxxxxx, Boqun Feng [PATCH 4/4] rust: sync: lock: use DropGuard (in 🛠️ ur)
Yest. 01:53 [12/12] Mohamed Osama, sashiko-bot@xxxxxxxxxx, Gary Guo [PATCH v3 2/5] rust: mem: add DropGuard (in 🛠️ ur)
Sat. 18:46 [11/11] Mohamed Osama, sashiko-bot@xxxxxxxxxx [PATCH v2 2/5] rust: mem: add DropGuard (in 🛠️ ur)
September 16 [2/2] Mohamed Osama, sashiko-bot@xxxxxxxxxx [PATCH v3] rust: mem: add DropGuard (in 🛠️ ur)
September 16 [2/2] Mohamed Osama, sashiko-bot@xxxxxxxxxx [PATCH v2] rust: mem: add DropGuard (in 🛠️ ur)
September 16 [2/2] Mohamed Osama, sashiko-bot@xxxxxxxxxx [PATCH v1] rust: mem: add DropGuard (in 🛠️ ur)
September 16 [2/2] Mohamed Osama, sashiko-bot@xxxxxxxxxx [PATCH] rust: mem: add DropGuard (in 🛠️ ur)

I'm confused about your versioning scheme.

Could you include links to earlier version of the series when you send a
new version?

The b4 tool handles most of this for you. I would recommend checking it
out [1].

The first v1 has a link to a github issue. Could you please keep
including this link? It is helpful for context.

Best regards,
Andreas Hindborg

[1] https://b4.docs.kernel.org/en/latest/contributor/prep.html