All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: mm-commits@vger.kernel.org,willy@infradead.org,sidhartha.kumar@oracle.com,liam.howlett@oracle.com,pfalcato@suse.de,akpm@linux-foundation.org
Subject: [obsolete] testing-radix-tree-maple-hack-around-kfree_rcu-not-existing.patch removed from -mm tree
Date: Fri, 15 Aug 2025 22:56:50 -0700	[thread overview]
Message-ID: <20250816055650.CA360C4CEEF@smtp.kernel.org> (raw)


The quilt patch titled
     Subject: testing/radix-tree/maple: hack around kfree_rcu not existing
has been removed from the -mm tree.  Its filename was
     testing-radix-tree-maple-hack-around-kfree_rcu-not-existing.patch

This patch was dropped because it is obsolete

------------------------------------------------------
From: Pedro Falcato <pfalcato@suse.de>
Subject: testing/radix-tree/maple: hack around kfree_rcu not existing
Date: Fri, 18 Jul 2025 18:21:37 +0100

liburcu doesn't have kfree_rcu (or anything similar).  Despite that, we
can hack around it in a trivial fashion, by adding a wrapper.

This wrapper only works for maple_nodes, and not anything else (due to us
not being able to know rcu_head offsets in any way), and thus we take
advantage of the type checking to avoid future silent breakage.

Link: https://lkml.kernel.org/r/20250718172138.103116-2-pfalcato@suse.de
Signed-off-by: Pedro Falcato <pfalcato@suse.de>
Reviewed-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Liam Howlett <liam.howlett@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 tools/testing/radix-tree/maple.c |   17 +++++++++++++++++
 1 file changed, 17 insertions(+)

--- a/tools/testing/radix-tree/maple.c~testing-radix-tree-maple-hack-around-kfree_rcu-not-existing
+++ a/tools/testing/radix-tree/maple.c
@@ -23,6 +23,23 @@
 #define MODULE_LICENSE(x)
 #define dump_stack()	assert(0)
 
+
+#include <linux/maple_tree.h>
+
+static void free_node(struct rcu_head *head)
+{
+	struct maple_node *node = container_of(head, struct maple_node, rcu);
+
+	free(node);
+}
+
+static void kfree_rcu_node(struct maple_node *node)
+{
+	call_rcu(&node->rcu, free_node);
+}
+
+#define kfree_rcu(ptr, memb) kfree_rcu_node(ptr)
+
 #include "../../../lib/maple_tree.c"
 #include "../../../lib/test_maple_tree.c"
 
_

Patches currently in -mm which might be from pfalcato@suse.de are



                 reply	other threads:[~2025-08-16  5:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20250816055650.CA360C4CEEF@smtp.kernel.org \
    --to=akpm@linux-foundation.org \
    --cc=liam.howlett@oracle.com \
    --cc=mm-commits@vger.kernel.org \
    --cc=pfalcato@suse.de \
    --cc=sidhartha.kumar@oracle.com \
    --cc=willy@infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.