From: Xiaolei Wang <xiaolei.wang@windriver.com>
To: catalin.marinas@arm.com, akpm@linux-foundation.org,
vbabka@suse.cz, glider@google.com, andreyknvl@gmail.com,
zhaoyang.huang@unisoc.com
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: [PATCH v2 2/2] Rename kmemleak_initialized to kmemleak_late_initialized
Date: Tue, 15 Aug 2023 13:13:58 +0800 [thread overview]
Message-ID: <20230815051358.802035-3-xiaolei.wang@windriver.com> (raw)
In-Reply-To: <20230815051358.802035-1-xiaolei.wang@windriver.com>
kmemleak_initialized is set in kmemleak_late_init()
instead of kmemleak_init(), which may cause confusion,
so rename kmemleak_initialized to kmemleak_late_initialized.
Signed-off-by: Xiaolei Wang <xiaolei.wang@windriver.com>
---
mm/kmemleak.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/mm/kmemleak.c b/mm/kmemleak.c
index 04bb4cdbb402..5c8e5a24b890 100644
--- a/mm/kmemleak.c
+++ b/mm/kmemleak.c
@@ -218,7 +218,7 @@ static int kmemleak_enabled = 1;
/* same as above but only for the kmemleak_free() callback */
static int kmemleak_free_enabled = 1;
/* set in the late_initcall if there were no errors */
-static int kmemleak_initialized;
+static int kmemleak_late_initialized;
/* set if a kmemleak warning was issued */
static int kmemleak_warning;
/* set if a fatal kmemleak error has occurred */
@@ -2053,7 +2053,7 @@ static void kmemleak_disable(void)
kmemleak_enabled = 0;
/* check whether it is too early for a kernel thread */
- if (kmemleak_initialized)
+ if (kmemleak_late_initialized)
schedule_work(&cleanup_work);
else
kmemleak_free_enabled = 0;
@@ -2118,7 +2118,7 @@ void __init kmemleak_init(void)
*/
static int __init kmemleak_late_init(void)
{
- kmemleak_initialized = 1;
+ kmemleak_late_initialized = 1;
debugfs_create_file("kmemleak", 0644, NULL, NULL, &kmemleak_fops);
@@ -2126,7 +2126,7 @@ static int __init kmemleak_late_init(void)
/*
* Some error occurred and kmemleak was disabled. There is a
* small chance that kmemleak_disable() was called immediately
- * after setting kmemleak_initialized and we may end up with
+ * after setting kmemleak_late_initialized and we may end up with
* two clean-up threads but serialized by scan_mutex.
*/
schedule_work(&cleanup_work);
--
2.25.1
next prev parent reply other threads:[~2023-08-15 5:14 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-15 5:13 [PATCH v2 0/2] mm/kmemleak: use object_cache instead of kmemleak_initialized Xiaolei Wang
2023-08-15 5:13 ` [PATCH v2 1/2] mm/kmemleak: use object_cache instead of kmemleak_initialized to check in set_track_prepare() Xiaolei Wang
2023-08-15 10:39 ` Catalin Marinas
2023-08-15 5:13 ` Xiaolei Wang [this message]
2023-08-15 10:40 ` [PATCH v2 2/2] Rename kmemleak_initialized to kmemleak_late_initialized Catalin Marinas
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=20230815051358.802035-3-xiaolei.wang@windriver.com \
--to=xiaolei.wang@windriver.com \
--cc=akpm@linux-foundation.org \
--cc=andreyknvl@gmail.com \
--cc=catalin.marinas@arm.com \
--cc=glider@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=vbabka@suse.cz \
--cc=zhaoyang.huang@unisoc.com \
/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