rust-add-a-rust-helper-for-krealloc.patch removed from -mm tree
The quilt patch titled
Subject: rust: add a rust helper for krealloc()
has been removed from the -mm tree. Its filename was
rust-add-a-rust-helper-for-krealloc.patch
This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
------------------------------------------------------
From: Kent Overstreet <[email protected]>
Subject: rust: add a rust helper for krealloc()
Date: Thu, 21 Mar 2024 09:36:46 -0700
Memory allocation profiling is turning krealloc() into a nontrivial macro
- so for now, we need a helper for it.
Until we have proper support on the rust side for memory allocation profiling this does mean that all Rust allocations will be accounted to the helper.
---
rust/helpers.c | 8 ++++++++ 1 file changed, 8 insertions(+)
rust/helpers.c renamed from rust/helpers.c~rust-add-a-rust-helper-for-krealloc +8 -0
@@ -28,6 +28,7 @@#include <linux/mutex.h> #include <linux/refcount.h> #include <linux/sched/signal.h> +#include <linux/slab.h> #include <linux/spinlock.h> #include <linux/wait.h> #include <linux/workqueue.h>
@@ -157,6 +158,13 @@ void rust_helper_init_work_with_key(stru }EXPORT_SYMBOL_GPL (rust_helper_init_work_with_key); +void * __must_check __realloc_size(2) +rust_helper_krealloc(const void *objp, size_t new_size, gfp_t flags) +{ +return krealloc (objp, new_size, flags); +} +EXPORT_SYMBOL_GPL (rust_helper_krealloc); +/* * `bindgen` binds the C `size_t` type as the Rust `usize` type, so we can * use it in contexts where Rust expects a `usize` like slice (array) indices.
_
Patches currently in -mm which might be from [email protected] are