From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: "Joel Fernandes, Google" <joel@joelfernandes.org>
Cc: Peter Zijlstra <peterz@infradead.org>,
"Frank Ch. Eigler" <fche@redhat.com>,
Jessica Yu <jeyu@kernel.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
Josh Poimboeuf <jpoimboe@redhat.com>, jikos <jikos@kernel.org>,
mbenes <mbenes@suse.cz>, Petr Mladek <pmladek@suse.com>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrew Morton <akpm@linux-foundation.org>,
Robert Richter <rric@kernel.org>, rostedt <rostedt@goodmis.org>,
Ingo Molnar <mingo@redhat.com>, Martin KaFai Lau <kafai@fb.com>,
Song Liu <songliubraving@fb.com>, Yonghong Song <yhs@fb.com>,
paulmck <paulmck@linux.ibm.com>,
Ard Biesheuvel <ard.biesheuvel@linaro.org>,
Thomas Gleixner <tglx@linutronix.de>,
oprofile-list <oprofile-list@lists.sf.net>,
netdev <netdev@vger.kernel.org>, bpf <bpf@vger.kernel.org>
Subject: Re: [PATCH 2/3] module: Fix up module_notifier return values.
Date: Mon, 24 Jun 2019 13:50:56 -0400 (EDT) [thread overview]
Message-ID: <2125299316.352.1561398656224.JavaMail.zimbra@efficios.com> (raw)
In-Reply-To: <20190624155213.GB261936@google.com>
----- On Jun 24, 2019, at 11:52 AM, Joel Fernandes, Google joel@joelfernandes.org wrote:
> On Mon, Jun 24, 2019 at 10:01:04AM -0400, Mathieu Desnoyers wrote:
>> ----- On Jun 24, 2019, at 5:18 AM, Peter Zijlstra peterz@infradead.org wrote:
>>
>> > While auditing all module notifiers I noticed a whole bunch of fail
>> > wrt the return value. Notifiers have a 'special' return semantics.
>> >
>> > Cc: Robert Richter <rric@kernel.org>
>> > Cc: Steven Rostedt <rostedt@goodmis.org>
>> > Cc: Ingo Molnar <mingo@redhat.com>
>> > Cc: Alexei Starovoitov <ast@kernel.org>
>> > Cc: Daniel Borkmann <daniel@iogearbox.net>
>> > Cc: Martin KaFai Lau <kafai@fb.com>
>> > Cc: Song Liu <songliubraving@fb.com>
>> > Cc: Yonghong Song <yhs@fb.com>
>> > Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
>> > Cc: "Paul E. McKenney" <paulmck@linux.ibm.com>
>> > Cc: "Joel Fernandes (Google)" <joel@joelfernandes.org>
>> > Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
>> > Cc: Thomas Gleixner <tglx@linutronix.de>
>> > Cc: oprofile-list@lists.sf.net
>> > Cc: linux-kernel@vger.kernel.org
>> > Cc: netdev@vger.kernel.org
>> > Cc: bpf@vger.kernel.org
>> > Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
>>
>> Thanks Peter for looking into this, especially considering your
>> endless love for kernel modules! ;)
>>
>> It's not directly related to your changes, but I notice that
>> kernel/trace/trace_printk.c:hold_module_trace_bprintk_format()
>> appears to leak memory. Am I missing something ?
>
> Could you elaborate? Do you mean there is no MODULE_STATE_GOING notifier
> check? If that's what you mean then I agree, there should be some place
> where the format structures are freed when the module is unloaded no?
Yes, the lack of GOING notifier is worrying considering that GOING
performs memory allocation.
Thanks,
Mathieu
--
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com
next prev parent reply other threads:[~2019-06-24 17:51 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190624091843.859714294@infradead.org>
2019-06-24 9:18 ` [PATCH 2/3] module: Fix up module_notifier return values Peter Zijlstra
2019-06-24 14:01 ` Mathieu Desnoyers
2019-06-24 15:52 ` Joel Fernandes
2019-06-24 17:50 ` Mathieu Desnoyers [this message]
2019-06-24 20:58 ` Frank Ch. Eigler
2019-06-25 7:42 ` Peter Zijlstra
2019-07-04 12:48 ` Robert Richter
2019-07-04 12:34 ` Robert Richter
2019-06-24 9:18 ` [PATCH 3/3] module: Properly propagate MODULE_STATE_COMING failure Peter Zijlstra
2019-06-24 11:07 ` Peter Zijlstra
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=2125299316.352.1561398656224.JavaMail.zimbra@efficios.com \
--to=mathieu.desnoyers@efficios.com \
--cc=akpm@linux-foundation.org \
--cc=ard.biesheuvel@linaro.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=fche@redhat.com \
--cc=jeyu@kernel.org \
--cc=jikos@kernel.org \
--cc=joel@joelfernandes.org \
--cc=jpoimboe@redhat.com \
--cc=kafai@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mbenes@suse.cz \
--cc=mingo@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=oprofile-list@lists.sf.net \
--cc=paulmck@linux.ibm.com \
--cc=peterz@infradead.org \
--cc=pmladek@suse.com \
--cc=rostedt@goodmis.org \
--cc=rric@kernel.org \
--cc=songliubraving@fb.com \
--cc=tglx@linutronix.de \
--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;
as well as URLs for NNTP newsgroup(s).