From: Steven Rostedt <rostedt@goodmis.org>
To: Axel Rasmussen <axelrasmussen@google.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Chinwen Chang <chinwen.chang@mediatek.com>,
Daniel Jordan <daniel.m.jordan@oracle.com>,
David Rientjes <rientjes@google.com>,
Davidlohr Bueso <dbueso@suse.de>, Ingo Molnar <mingo@redhat.com>,
Jann Horn <jannh@google.com>,
Laurent Dufour <ldufour@linux.ibm.com>,
Michel Lespinasse <walken@google.com>,
Stephen Rothwell <sfr@canb.auug.org.au>,
Vlastimil Babka <vbabka@suse.cz>,
Yafang Shao <laoar.shao@gmail.com>,
davem@davemloft.net, dsahern@kernel.org,
gregkh@linuxfoundation.org, kuba@kernel.org,
liuhangbin@gmail.com, tj@kernel.org,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH v2] mm: mmap_lock: fix use-after-free race and css ref leak in tracepoints
Date: Tue, 1 Dec 2020 16:31:04 -0500 [thread overview]
Message-ID: <20201201163104.5d178986@gandalf.local.home> (raw)
In-Reply-To: <20201201162847.654f3013@gandalf.local.home>
On Tue, 1 Dec 2020 16:28:47 -0500
Steven Rostedt <rostedt@goodmis.org> wrote:
> On Tue, 1 Dec 2020 12:32:49 -0800
> Axel Rasmussen <axelrasmussen@google.com> wrote:
>
> > +/* Called with reg_lock held. */
>
> The above comment is reduntant, as the lockdep_is_held() below also suggest
> that it is ;-)
>
>
> > static inline char *get_memcg_path_buf(void)
> > {
> > + char *buf;
> > int idx;
> >
> > + rcu_read_lock();
>
> The caller of get_mm_memcg_path() has preemption disabled, which is also
> now an RCU lock. So the rcu_read_lock() is somewhat redundant.
BTW, both of these comments are FYI. You can keep the comment and keep the
rcu_read_lock(). I was just stating that they are redundant, but keeping
them may make the code a bit more robust.
-- Steve
prev parent reply other threads:[~2020-12-01 21:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-01 20:32 [PATCH v2] mm: mmap_lock: fix use-after-free race and css ref leak in tracepoints Axel Rasmussen
2020-12-01 21:28 ` Steven Rostedt
2020-12-01 21:31 ` Steven Rostedt [this message]
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=20201201163104.5d178986@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=akpm@linux-foundation.org \
--cc=axelrasmussen@google.com \
--cc=chinwen.chang@mediatek.com \
--cc=daniel.m.jordan@oracle.com \
--cc=davem@davemloft.net \
--cc=dbueso@suse.de \
--cc=dsahern@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=jannh@google.com \
--cc=kuba@kernel.org \
--cc=laoar.shao@gmail.com \
--cc=ldufour@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=liuhangbin@gmail.com \
--cc=mingo@redhat.com \
--cc=rientjes@google.com \
--cc=sfr@canb.auug.org.au \
--cc=tj@kernel.org \
--cc=vbabka@suse.cz \
--cc=walken@google.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).