[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240925143154.2322926-2-ranxiaokai627@163.com>
Date: Wed, 25 Sep 2024 14:31:51 +0000
From: ran xiaokai <ranxiaokai627@....com>
To: elver@...gle.com,
tglx@...utronix.de,
dvyukov@...gle.com
Cc: kasan-dev@...glegroups.com,
linux-kernel@...r.kernel.org,
Ran Xiaokai <ran.xiaokai@....com.cn>
Subject: [PATCH 1/4] kcsan, debugfs: 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>
---
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 53b21ae30e00..ed483987869e 100644
--- a/kernel/kcsan/debugfs.c
+++ b/kernel/kcsan/debugfs.c
@@ -181,8 +181,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;
out:
--
2.15.2
Powered by blists - more mailing lists