From: Arnd Bergmann <arnd@arndb.de>
To: Steven Rostedt <rostedt@goodmis.org>,
Ingo Molnar <mingo@redhat.com>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>
Cc: Arnd Bergmann <arnd@arndb.de>, Andrii Nakryiko <andriin@fb.com>,
Yonghong Song <yhs@fb.com>, Martin KaFai Lau <kafai@fb.com>,
Song Liu <songliubraving@fb.com>, Matt Mullins <mmullins@fb.com>,
netdev@vger.kernel.org, bpf@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH] bpf: hide do_bpf_send_signal when unused
Date: Mon, 17 Jun 2019 14:57:07 +0200 [thread overview]
Message-ID: <20190617125724.1616165-1-arnd@arndb.de> (raw)
When CONFIG_MODULES is disabled, this function is never called:
kernel/trace/bpf_trace.c:581:13: error: 'do_bpf_send_signal' defined but not used [-Werror=unused-function]
Add another #ifdef around it.
Fixes: 8b401f9ed244 ("bpf: implement bpf_send_signal() helper")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
---
kernel/trace/bpf_trace.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/trace/bpf_trace.c b/kernel/trace/bpf_trace.c
index c102c240bb0b..b1a814e2d451 100644
--- a/kernel/trace/bpf_trace.c
+++ b/kernel/trace/bpf_trace.c
@@ -602,6 +602,7 @@ struct send_signal_irq_work {
static DEFINE_PER_CPU(struct send_signal_irq_work, send_signal_work);
+#ifdef CONFIG_MODULES
static void do_bpf_send_signal(struct irq_work *entry)
{
struct send_signal_irq_work *work;
@@ -609,6 +610,7 @@ static void do_bpf_send_signal(struct irq_work *entry)
work = container_of(entry, struct send_signal_irq_work, irq_work);
group_send_sig_info(work->sig, SEND_SIG_PRIV, work->task, PIDTYPE_TGID);
}
+#endif
BPF_CALL_1(bpf_send_signal, u32, sig)
{
--
2.20.0
next reply other threads:[~2019-06-17 12:58 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-17 12:57 Arnd Bergmann [this message]
2019-06-17 15:26 ` Alexei Starovoitov
2019-06-17 23:09 ` Steven Rostedt
2019-06-17 23:13 ` Matt Mullins
2019-06-17 23:27 ` Alexei Starovoitov
2019-06-18 0:18 ` Steven Rostedt
2019-06-24 20:37 ` Yonghong Song
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=20190617125724.1616165-1-arnd@arndb.de \
--to=arnd@arndb.de \
--cc=andriin@fb.com \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=kafai@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=mmullins@fb.com \
--cc=netdev@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=songliubraving@fb.com \
--cc=yhs@fb.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
all inboxes | Powered by JetHome®