[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20241014144300.3182961-2-elver@google.com>
Date: Mon, 14 Oct 2024 16:42:53 +0200
From: Marco Elver <elver@...gle.com>
To: elver@...gle.com, "Paul E. McKenney" <paulmck@...nel.org>
Cc: Mark Rutland <mark.rutland@....com>, Dmitry Vyukov <dvyukov@...gle.com>,
Alexander Potapenko <glider@...gle.com>, Boqun Feng <boqun.feng@...il.com>, kasan-dev@...glegroups.com,
linux-kernel@...r.kernel.org, Ran Xiaokai <ran.xiaokai@....com.cn>
Subject: [PATCH 2/2] kcsan: Remove redundant call of kallsyms_lookup_name()
From: Ran Xiaokai <ran.xiaokai@....com.cn>
There is no need to repeatedly call kallsyms_lookup_name, we can reuse
the return value of this function.
Signed-off-by: Ran Xiaokai <ran.xiaokai@....com.cn>
Signed-off-by: Marco Elver <elver@...gle.com>
---
kernel/kcsan/debugfs.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/kernel/kcsan/debugfs.c b/kernel/kcsan/debugfs.c
index b14072071889..2af39ba5b70b 100644
--- a/kernel/kcsan/debugfs.c
+++ b/kernel/kcsan/debugfs.c
@@ -179,8 +179,7 @@ static ssize_t insert_report_filterlist(const char *func)
}
/* Note: deduplicating should be done in userspace. */
- report_filterlist.addrs[report_filterlist.used++] =
- kallsyms_lookup_name(func);
+ report_filterlist.addrs[report_filterlist.used++] = addr;
report_filterlist.sorted = false;
raw_spin_unlock_irqrestore(&report_filterlist_lock, flags);
--
2.47.0.rc1.288.g06298d1525-goog
Powered by blists - more mailing lists