Linux RCU subsystem development
 help / color / mirror / Atom feed
From: Kent Overstreet <kent.overstreet@linux.dev>
To: rcu@vger.kernel.org
Cc: Kent Overstreet <kent.overstreet@linux.dev>,
	paulmck@kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 4/9] vmalloc: is_vmalloc_addr_inlined()
Date: Mon, 19 Aug 2024 12:59:30 -0400	[thread overview]
Message-ID: <20240819165939.745801-5-kent.overstreet@linux.dev> (raw)
In-Reply-To: <20240819165939.745801-1-kent.overstreet@linux.dev>

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
---
 include/linux/mm.h | 7 +++++++
 mm/vmalloc.c       | 4 +---
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/include/linux/mm.h b/include/linux/mm.h
index c4b238a20b76..e23516d197d7 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -1193,6 +1193,13 @@ unsigned long vmalloc_to_pfn(const void *addr);
  * is no special casing required.
  */
 #ifdef CONFIG_MMU
+static inline bool is_vmalloc_addr_inlined(const void *x)
+{
+	unsigned long addr = (unsigned long)kasan_reset_tag(x);
+
+	return addr >= VMALLOC_START && addr < VMALLOC_END;
+}
+
 extern bool is_vmalloc_addr(const void *x);
 extern int is_vmalloc_or_module_addr(const void *x);
 #else
diff --git a/mm/vmalloc.c b/mm/vmalloc.c
index 6b783baf12a1..2bba32d54fb6 100644
--- a/mm/vmalloc.c
+++ b/mm/vmalloc.c
@@ -78,9 +78,7 @@ static const bool vmap_allow_huge = false;
 
 bool is_vmalloc_addr(const void *x)
 {
-	unsigned long addr = (unsigned long)kasan_reset_tag(x);
-
-	return addr >= VMALLOC_START && addr < VMALLOC_END;
+	return is_vmalloc_addr_inlined(x);
 }
 EXPORT_SYMBOL(is_vmalloc_addr);
 
-- 
2.45.2


  parent reply	other threads:[~2024-08-19 16:59 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-19 16:59 [PATCH 0/9] rcu_pending Kent Overstreet
2024-08-19 16:59 ` [PATCH 1/9] lib/generic-radix-tree.c: genradix_ptr_inlined() Kent Overstreet
2024-08-19 16:59 ` [PATCH 2/9] lib/generic-radix-tree.c: add preallocation Kent Overstreet
2024-08-19 16:59 ` [PATCH 3/9] darray: lift from bcachefs Kent Overstreet
2024-08-21  1:00   ` Jeff Johnson
2024-08-19 16:59 ` Kent Overstreet [this message]
2024-08-19 16:59 ` [PATCH 5/9] rcu: delete lockdep_assert_irqs_enabled() assert in start_poll_synchronize_rcu_common() Kent Overstreet
2024-08-19 21:11   ` Paul E. McKenney
2024-08-19 16:59 ` [PATCH 6/9] rcu: rcu_pending Kent Overstreet
2024-08-19 22:58   ` Paul E. McKenney
2024-08-19 23:59     ` Kent Overstreet
2024-08-26 14:44       ` Paul E. McKenney
2024-08-26 15:17         ` Kent Overstreet
2024-08-26 16:01           ` Paul E. McKenney
2024-08-26 17:09             ` Kent Overstreet
2024-08-30 19:01               ` Paul E. McKenney
2024-09-01  0:03                 ` Kent Overstreet
2024-08-19 16:59 ` [PATCH 7/9] bcachefs: Rip out freelists from btree key cache Kent Overstreet
2024-08-19 16:59 ` [PATCH 8/9] bcachefs: key cache can now allocate from pending Kent Overstreet
2024-08-19 16:59 ` [PATCH 9/9] rcu: Switch kvfree_rcu() to new rcu_pending Kent Overstreet
2024-08-19 22:18   ` Paul E. McKenney
2024-08-19 23:05     ` Kent Overstreet
2024-08-19 23:07 ` [PATCH 0/9] rcu_pending Paul E. McKenney
2024-08-19 23:29   ` Kent Overstreet

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=20240819165939.745801-5-kent.overstreet@linux.dev \
    --to=kent.overstreet@linux.dev \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@kernel.org \
    --cc=rcu@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox