mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v4 0/4] rust: introduce DropGuard
@ 2026-09-27 10:45 ` Mohamed Osama
  2026-09-27 10:45   ` [PATCH 1/4] rust: mem: add DropGuard Mohamed Osama
                     ` (4 more replies)
  0 siblings, 5 replies; 8+ messages in thread
From: Mohamed Osama @ 2026-09-27 10:45 UTC (permalink / raw)
  To: ojeda
  Cc: boqun, gary, bjorn3_gh, lossin, a.hindborg, aliceryhl, tmgross,
	dakr, daniel.almeida, tamird, acourbot, work, longman, lyude,
	linux-block, linux-serial, rust-for-linux, linux-kernel

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.

Testing:
- make LLVM=1 rustfmtcheck
- make LLVM=1 -j$(nproc)

Suggested-by: Gary Guo <gary@garyguo.net>
Signed-off-by: Mohamed Osama <mohamed.osama189110@gmail.com>

Mohamed Osama (4):
  rust: mem: add DropGuard
  rust: block: gen_disk: use DropGuard
  rust: serdev: use DropGuard
  rust: sync: lock: use DropGuard

 rust/kernel/block/mq/gen_disk.rs | 11 ++--
 rust/kernel/mem.rs               |  2 +
 rust/kernel/serdev.rs            | 10 ++--
 rust/kernel/std_vendor.rs        | 87 ++++++++++++++++++++++++++++++++
 rust/kernel/sync/lock.rs         |  5 +-
 5 files changed, 102 insertions(+), 13 deletions(-)

-- 
2.43.0


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

* [PATCH 1/4] rust: mem: add DropGuard
  2026-09-27 10:45 ` [PATCH v4 0/4] rust: introduce DropGuard Mohamed Osama
@ 2026-09-27 10:45   ` Mohamed Osama
  2026-09-27 10:45   ` [PATCH 2/4] rust: block: gen_disk: use DropGuard Mohamed Osama
                     ` (3 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Mohamed Osama @ 2026-09-27 10:45 UTC (permalink / raw)
  To: ojeda
  Cc: boqun, gary, bjorn3_gh, lossin, a.hindborg, aliceryhl, tmgross,
	dakr, daniel.almeida, tamird, acourbot, work, longman, lyude,
	linux-block, linux-serial, rust-for-linux, linux-kernel

Vendor DropGuard from the Rust standard library and re-export it
from kernel::mem.

DropGuard runs a FnOnce callback when the guard is dropped and provides
dismiss() to take ownership of the wrapped value without running the
cleanup callback.

The kernel version removes unstable const-trait machinery from the
upstream implementation and adds #[inline] where appropriate.

Suggested-by: Gary Guo <gary@garyguo.net>
Signed-off-by: Mohamed Osama <mohamed.osama189110@gmail.com>
---
 rust/kernel/mem.rs        |  2 +
 rust/kernel/std_vendor.rs | 87 +++++++++++++++++++++++++++++++++++++++
 2 files changed, 89 insertions(+)

diff --git a/rust/kernel/mem.rs b/rust/kernel/mem.rs
index f2d4cdf87d00..7f8ddd96f907 100644
--- a/rust/kernel/mem.rs
+++ b/rust/kernel/mem.rs
@@ -4,6 +4,8 @@
 
 use crate::prelude::*;
 
+pub use crate::std_vendor::DropGuard;
+
 /// Transmute between two types.
 ///
 /// Use this instead of [`core::mem::transmute`] when it is known that sizes are identical but this
diff --git a/rust/kernel/std_vendor.rs b/rust/kernel/std_vendor.rs
index abbab5050cc5..21a26b4eec71 100644
--- a/rust/kernel/std_vendor.rs
+++ b/rust/kernel/std_vendor.rs
@@ -7,6 +7,9 @@
 //! "Apache-2.0 OR MIT" and adapted for kernel use. For copyright details,
 //! see <https://github.com/rust-lang/rust/blob/master/COPYRIGHT>.
 
+use core::mem::ManuallyDrop;
+use core::ops::{Deref, DerefMut};
+
 /// [`std::dbg`], but using [`pr_info`] instead of [`eprintln`].
 ///
 /// Prints and returns the value of a given expression for quick and dirty
@@ -162,3 +165,87 @@ macro_rules! dbg {
         ($($crate::dbg!($val)),+,)
     };
 }
+
+/// Wraps a value and runs a closure when dropped.
+///
+/// This is useful for running cleanup code when leaving a scope.
+///
+/// The [`DropGuard::dismiss`] function can be used to take ownership of the wrapped
+/// value without running the cleanup function.
+#[doc(alias = "ScopeGuard")]
+#[doc(alias = "defer")]
+pub struct DropGuard<T, F>
+where
+    F: FnOnce(T),
+{
+    inner: ManuallyDrop<T>,
+    f: ManuallyDrop<F>,
+}
+
+impl<T, F> DropGuard<T, F>
+where
+    F: FnOnce(T),
+{
+    /// Creates a new `DropGuard`.
+    #[inline]
+    #[must_use]
+    pub fn new(inner: T, f: F) -> Self {
+        Self {
+            inner: ManuallyDrop::new(inner),
+            f: ManuallyDrop::new(f),
+        }
+    }
+
+    /// Consumes the `DropGuard`, returning the wrapped value without
+    /// running the cleanup function.
+    #[inline]
+    pub fn dismiss(guard: Self) -> T {
+        let mut guard = ManuallyDrop::new(guard);
+
+        // SAFETY: We have taken ownership of the guard and prevent its destructor from running.
+        let value = unsafe { ManuallyDrop::take(&mut guard.inner) };
+
+        // SAFETY: We have taken ownership of the guard.
+        unsafe { ManuallyDrop::drop(&mut guard.f) };
+
+        value
+    }
+}
+
+impl<T, F> Deref for DropGuard<T, F>
+where
+    F: FnOnce(T),
+{
+    type Target = T;
+
+    #[inline]
+    fn deref(&self) -> &T {
+        &self.inner
+    }
+}
+
+impl<T, F> DerefMut for DropGuard<T, F>
+where
+    F: FnOnce(T),
+{
+    #[inline]
+    fn deref_mut(&mut self) -> &mut T {
+        &mut self.inner
+    }
+}
+
+impl<T, F> Drop for DropGuard<T, F>
+where
+    F: FnOnce(T),
+{
+    #[inline]
+    fn drop(&mut self) {
+        // SAFETY: `DropGuard` is in the process of being dropped.
+        let inner = unsafe { ManuallyDrop::take(&mut self.inner) };
+
+        // SAFETY: `DropGuard` is in the process of being dropped.
+        let f = unsafe { ManuallyDrop::take(&mut self.f) };
+
+        f(inner);
+    }
+}
-- 
2.43.0


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

* [PATCH 2/4] rust: block: gen_disk: use DropGuard
  2026-09-27 10:45 ` [PATCH v4 0/4] rust: introduce DropGuard Mohamed Osama
  2026-09-27 10:45   ` [PATCH 1/4] rust: mem: add DropGuard Mohamed Osama
@ 2026-09-27 10:45   ` Mohamed Osama
  2026-09-27 10:45   ` [PATCH 3/4] rust: serdev: " Mohamed Osama
                     ` (2 subsequent siblings)
  4 siblings, 0 replies; 8+ messages in thread
From: Mohamed Osama @ 2026-09-27 10:45 UTC (permalink / raw)
  To: ojeda
  Cc: boqun, gary, bjorn3_gh, lossin, a.hindborg, aliceryhl, tmgross,
	dakr, daniel.almeida, tamird, acourbot, work, longman, lyude,
	linux-block, linux-serial, rust-for-linux, linux-kernel

Replace the ScopeGuard instances in the Rust block layer generic disk
implementation with DropGuard.

DropGuard provides the same scope-exit cleanup behavior while using the
new Rust kernel memory API.

Signed-off-by: Mohamed Osama <mohamed.osama189110@gmail.com>
---
 rust/kernel/block/mq/gen_disk.rs | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/rust/kernel/block/mq/gen_disk.rs b/rust/kernel/block/mq/gen_disk.rs
index fc97dd873974..d9019fbbb361 100644
--- a/rust/kernel/block/mq/gen_disk.rs
+++ b/rust/kernel/block/mq/gen_disk.rs
@@ -10,11 +10,12 @@
     block::mq::{Operations, TagSet},
     error::{self, from_err_ptr, Result},
     fmt::{self, Write},
+    mem::DropGuard,
     prelude::*,
     static_lock_class,
     str::NullTerminatedFormatter,
     sync::Arc,
-    types::{ForeignOwnable, ScopeGuard},
+    types::ForeignOwnable,
 };
 
 /// A builder for [`GenDisk`].
@@ -102,7 +103,7 @@ pub fn build<T: Operations>(
         queue_data: T::QueueData,
     ) -> Result<GenDisk<T>> {
         let data = queue_data.into_foreign();
-        let recover_data = ScopeGuard::new(|| {
+        let recover_data = DropGuard::new((), |_| {
             // SAFETY: T::QueueData was created by the call to `into_foreign()` above
             drop(unsafe { T::QueueData::from_foreign(data) });
         });
@@ -150,7 +151,7 @@ pub fn build<T: Operations>(
         // SAFETY: `gendisk` is a valid pointer as we initialized it above
         unsafe { (*gendisk).fops = &TABLE };
 
-        let cleanup_failure = ScopeGuard::new_with_data((gendisk, data), |(gendisk, data)| {
+        let cleanup_failure = DropGuard::new((gendisk, data), |(gendisk, data)| {
             // SAFETY: `gendisk` came from `__blk_mq_alloc_disk()` above and
             // has not been added to the VFS on this cleanup path.
             unsafe { bindings::put_disk(gendisk) };
@@ -161,7 +162,7 @@ pub fn build<T: Operations>(
 
         // The failure guard now owns both pieces of cleanup; the early guard
         // must not run on this path anymore.
-        recover_data.dismiss();
+        DropGuard::dismiss(recover_data);
 
         let mut writer = NullTerminatedFormatter::new(
             // SAFETY: `gendisk` points to a valid and initialized instance. We
@@ -185,7 +186,7 @@ pub fn build<T: Operations>(
             },
         )?;
 
-        cleanup_failure.dismiss();
+        DropGuard::dismiss(cleanup_failure);
 
         // INVARIANT: `gendisk` was initialized above.
         // INVARIANT: `gendisk` was added to the VFS via `device_add_disk` above.
-- 
2.43.0


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

* [PATCH 3/4] rust: serdev: use DropGuard
  2026-09-27 10:45 ` [PATCH v4 0/4] rust: introduce DropGuard Mohamed Osama
  2026-09-27 10:45   ` [PATCH 1/4] rust: mem: add DropGuard Mohamed Osama
  2026-09-27 10:45   ` [PATCH 2/4] rust: block: gen_disk: use DropGuard Mohamed Osama
@ 2026-09-27 10:45   ` Mohamed Osama
  2026-09-27 10:45   ` [PATCH 4/4] rust: sync: lock: " Mohamed Osama
  2026-09-28  9:48   ` [PATCH v4 0/4] rust: introduce DropGuard Andreas Hindborg
  4 siblings, 0 replies; 8+ messages in thread
From: Mohamed Osama @ 2026-09-27 10:45 UTC (permalink / raw)
  To: ojeda
  Cc: boqun, gary, bjorn3_gh, lossin, a.hindborg, aliceryhl, tmgross,
	dakr, daniel.almeida, tamird, acourbot, work, longman, lyude,
	linux-block, linux-serial, rust-for-linux, linux-kernel

Replace the ScopeGuard usage in the serial device bus implementation
with DropGuard.

Use DropGuard::dismiss() when ownership of the private data needs to be
transferred without running the cleanup callback.

Signed-off-by: Mohamed Osama <mohamed.osama189110@gmail.com>
---
 rust/kernel/serdev.rs | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/rust/kernel/serdev.rs b/rust/kernel/serdev.rs
index 17ca504b7f8d..dd43b159b461 100644
--- a/rust/kernel/serdev.rs
+++ b/rust/kernel/serdev.rs
@@ -13,6 +13,7 @@
         to_result,
         VTABLE_DEFAULT_ERROR, //
     },
+    mem::DropGuard,
     new_mutex,
     of,
     prelude::*,
@@ -21,10 +22,7 @@
         Mutex, //
     },
     time::Jiffies,
-    types::{
-        Opaque,
-        ScopeGuard, //
-    }, //
+    types::Opaque, //
 };
 
 use core::{
@@ -174,7 +172,7 @@ extern "C" fn probe_callback(sdev: *mut bindings::serdev_device) -> kernel::ffi:
             }))?;
             // SAFETY: We just set drvdata to `PrivateData<'_, T>`.
             let private_data = unsafe { sdev.as_ref().drvdata_borrow::<PrivateData<'_, T>>() };
-            let private_data = ScopeGuard::new_with_data(private_data, |_| {
+            let private_data = DropGuard::new(private_data, |_| {
                 // SAFETY: We just set drvdata to `PrivateData<'_, T>`.
                 drop(unsafe { sdev.as_ref().drvdata_obtain::<PrivateData<'_, T>>() });
             });
@@ -204,7 +202,7 @@ extern "C" fn probe_callback(sdev: *mut bindings::serdev_device) -> kernel::ffi:
             drop(active);
 
             result.map(|()| {
-                private_data.dismiss();
+                DropGuard::dismiss(private_data);
                 0
             })
         })
-- 
2.43.0


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

* [PATCH 4/4] rust: sync: lock: use DropGuard
  2026-09-27 10:45 ` [PATCH v4 0/4] rust: introduce DropGuard Mohamed Osama
                     ` (2 preceding siblings ...)
  2026-09-27 10:45   ` [PATCH 3/4] rust: serdev: " Mohamed Osama
@ 2026-09-27 10:45   ` Mohamed Osama
  2026-09-28  9:03     ` Boqun Feng
  2026-09-28  9:48   ` [PATCH v4 0/4] rust: introduce DropGuard Andreas Hindborg
  4 siblings, 1 reply; 8+ messages in thread
From: Mohamed Osama @ 2026-09-27 10:45 UTC (permalink / raw)
  To: ojeda
  Cc: boqun, gary, bjorn3_gh, lossin, a.hindborg, aliceryhl, tmgross,
	dakr, daniel.almeida, tamird, acourbot, work, longman, lyude,
	linux-block, linux-serial, rust-for-linux, linux-kernel

Replace the ScopeGuard usage in the Rust locking implementation with
DropGuard.

The guard preserves the existing scope-exit cleanup behavior while using
the DropGuard API from the Rust kernel memory module.

Signed-off-by: Mohamed Osama <mohamed.osama189110@gmail.com>
---
 rust/kernel/sync/lock.rs | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/rust/kernel/sync/lock.rs b/rust/kernel/sync/lock.rs
index 10b6b5e9b024..15f9cbe76c8d 100644
--- a/rust/kernel/sync/lock.rs
+++ b/rust/kernel/sync/lock.rs
@@ -7,8 +7,9 @@
 
 use super::LockClassKey;
 use crate::{
+    mem::DropGuard,
     str::{CStr, CStrExt as _},
-    types::{NotThreadSafe, Opaque, ScopeGuard},
+    types::{NotThreadSafe, Opaque},
 };
 use core::{cell::UnsafeCell, marker::PhantomPinned, pin::Pin};
 use pin_init::{pin_data, pin_init, PinInit, Wrapper};
@@ -242,7 +243,7 @@ pub(crate) fn do_unlocked<U>(&mut self, cb: impl FnOnce() -> U) -> U {
         // SAFETY: The caller owns the lock, so it is safe to unlock it.
         unsafe { B::unlock(self.lock.state.get(), &self.state) };
 
-        let _relock = ScopeGuard::new(||
+        let _relock = DropGuard::new((), |_|
                 // SAFETY: The lock was just unlocked above and is being relocked now.
                 unsafe { B::relock(self.lock.state.get(), &mut self.state) });
 
-- 
2.43.0


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

* Re: [PATCH 4/4] rust: sync: lock: use DropGuard
  2026-09-27 10:45   ` [PATCH 4/4] rust: sync: lock: " Mohamed Osama
@ 2026-09-28  9:03     ` Boqun Feng
  0 siblings, 0 replies; 8+ messages in thread
From: Boqun Feng @ 2026-09-28  9:03 UTC (permalink / raw)
  To: Mohamed Osama
  Cc: ojeda, gary, bjorn3_gh, lossin, a.hindborg, aliceryhl, tmgross,
	dakr, daniel.almeida, tamird, acourbot, work, longman, lyude,
	linux-block, linux-serial, rust-for-linux, linux-kernel

On Sun, Sep 27, 2026 at 01:45:28PM +0300, Mohamed Osama wrote:
> Replace the ScopeGuard usage in the Rust locking implementation with
> DropGuard.
> 
> The guard preserves the existing scope-exit cleanup behavior while using
> the DropGuard API from the Rust kernel memory module.
> 
> Signed-off-by: Mohamed Osama <mohamed.osama189110@gmail.com>

Reviewed-by: Boqun Feng <boqun@kernel.org>

Regards,
Boqun

> ---
>  rust/kernel/sync/lock.rs | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/rust/kernel/sync/lock.rs b/rust/kernel/sync/lock.rs
> index 10b6b5e9b024..15f9cbe76c8d 100644
> --- a/rust/kernel/sync/lock.rs
> +++ b/rust/kernel/sync/lock.rs
> @@ -7,8 +7,9 @@
>  
>  use super::LockClassKey;
>  use crate::{
> +    mem::DropGuard,
>      str::{CStr, CStrExt as _},
> -    types::{NotThreadSafe, Opaque, ScopeGuard},
> +    types::{NotThreadSafe, Opaque},
>  };
>  use core::{cell::UnsafeCell, marker::PhantomPinned, pin::Pin};
>  use pin_init::{pin_data, pin_init, PinInit, Wrapper};
> @@ -242,7 +243,7 @@ pub(crate) fn do_unlocked<U>(&mut self, cb: impl FnOnce() -> U) -> U {
>          // SAFETY: The caller owns the lock, so it is safe to unlock it.
>          unsafe { B::unlock(self.lock.state.get(), &self.state) };
>  
> -        let _relock = ScopeGuard::new(||
> +        let _relock = DropGuard::new((), |_|
>                  // SAFETY: The lock was just unlocked above and is being relocked now.
>                  unsafe { B::relock(self.lock.state.get(), &mut self.state) });
>  
> -- 
> 2.43.0
> 

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

* Re: [PATCH v4 0/4] rust: introduce DropGuard
  2026-09-27 10:45 ` [PATCH v4 0/4] rust: introduce DropGuard Mohamed Osama
                     ` (3 preceding siblings ...)
  2026-09-27 10:45   ` [PATCH 4/4] rust: sync: lock: " Mohamed Osama
@ 2026-09-28  9:48   ` Andreas Hindborg
  2026-09-28  9:50     ` Andreas Hindborg
  4 siblings, 1 reply; 8+ messages in thread
From: Andreas Hindborg @ 2026-09-28  9:48 UTC (permalink / raw)
  To: Mohamed Osama, ojeda
  Cc: boqun, gary, bjorn3_gh, lossin, aliceryhl, tmgross, dakr,
	daniel.almeida, tamird, acourbot, work, longman, lyude,
	linux-block, linux-serial, rust-for-linux, linux-kernel

"Mohamed Osama" <mohamed.osama189110@gmail.com> 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@kernel.org, Boqun Feng    [PATCH 4/4] rust: sync: lock: use DropGuard (in 🛠️ ur)
  Yest. 01:53 [12/12] Mohamed Osama, sashiko-bot@kernel.org, Gary Guo    [PATCH v3 2/5] rust: mem: add DropGuard (in 🛠️ ur)
    Sat. 18:46 [11/11] Mohamed Osama, sashiko-bot@kernel.org    [PATCH v2 2/5] rust: mem: add DropGuard (in 🛠️ ur)
  September 16 [2/2]   Mohamed Osama, sashiko-bot@kernel.org    [PATCH v3] rust: mem: add DropGuard (in 🛠️ ur)
  September 16 [2/2]   Mohamed Osama, sashiko-bot@kernel.org    [PATCH v2] rust: mem: add DropGuard (in 🛠️ ur)
  September 16 [2/2]   Mohamed Osama, sashiko-bot@kernel.org    [PATCH v1] rust: mem: add DropGuard (in 🛠️ ur)
  September 16 [2/2]   Mohamed Osama, sashiko-bot@kernel.org    [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


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

* Re: [PATCH v4 0/4] rust: introduce DropGuard
  2026-09-28  9:48   ` [PATCH v4 0/4] rust: introduce DropGuard Andreas Hindborg
@ 2026-09-28  9:50     ` Andreas Hindborg
  0 siblings, 0 replies; 8+ messages in thread
From: Andreas Hindborg @ 2026-09-28  9:50 UTC (permalink / raw)
  To: Mohamed Osama, ojeda
  Cc: boqun, gary, bjorn3_gh, lossin, aliceryhl, tmgross, dakr,
	daniel.almeida, tamird, acourbot, work, longman, lyude,
	linux-block, linux-serial, rust-for-linux, linux-kernel

Andreas Hindborg <a.hindborg@kernel.org> writes:

> "Mohamed Osama" <mohamed.osama189110@gmail.com> 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@kernel.org, Boqun Feng    [PATCH 4/4] rust: sync: lock: use DropGuard (in 🛠️ ur)
>   Yest. 01:53 [12/12] Mohamed Osama, sashiko-bot@kernel.org, Gary Guo    [PATCH v3 2/5] rust: mem: add DropGuard (in 🛠️ ur)
>     Sat. 18:46 [11/11] Mohamed Osama, sashiko-bot@kernel.org    [PATCH v2 2/5] rust: mem: add DropGuard (in 🛠️ ur)
>   September 16 [2/2]   Mohamed Osama, sashiko-bot@kernel.org    [PATCH v3] rust: mem: add DropGuard (in 🛠️ ur)
>   September 16 [2/2]   Mohamed Osama, sashiko-bot@kernel.org    [PATCH v2] rust: mem: add DropGuard (in 🛠️ ur)
>   September 16 [2/2]   Mohamed Osama, sashiko-bot@kernel.org    [PATCH v1] rust: mem: add DropGuard (in 🛠️ ur)
>   September 16 [2/2]   Mohamed Osama, sashiko-bot@kernel.org    [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

Also please include the rationale for the change in the cover letter and
commit message. Something along the lines of what is in the github issue
would be fine.


Best regards,
Andreas Hindborg



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

end of thread, other threads:[~2026-09-28  9:51 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <Dch07wH15t-1WtaVQW4vdfmtJuwC_4-JLvrWSB8Pk4vfEHO6mQk1FpYG-tCYBllTB3RbpOXpdyNZp84w4PFl1A==@protonmail.internalid>
2026-09-27 10:45 ` [PATCH v4 0/4] rust: introduce DropGuard Mohamed Osama
2026-09-27 10:45   ` [PATCH 1/4] rust: mem: add DropGuard Mohamed Osama
2026-09-27 10:45   ` [PATCH 2/4] rust: block: gen_disk: use DropGuard Mohamed Osama
2026-09-27 10:45   ` [PATCH 3/4] rust: serdev: " Mohamed Osama
2026-09-27 10:45   ` [PATCH 4/4] rust: sync: lock: " Mohamed Osama
2026-09-28  9:03     ` Boqun Feng
2026-09-28  9:48   ` [PATCH v4 0/4] rust: introduce DropGuard Andreas Hindborg
2026-09-28  9:50     ` Andreas Hindborg

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

all inboxes | Powered by JetHome®