From: Matthew Wilcox <willy@infradead.org>
To: Yonghong Song <yhs@fb.com>
Cc: bpf@vger.kernel.org, linux-mm@kvack.org,
Alexei Starovoitov <ast@kernel.org>,
Andrii Nakryiko <andrii@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
kernel-team@fb.com, Luigi Rizzo <lrizzo@google.com>,
Jason Gunthorpe <jgg@ziepe.ca>
Subject: Re: [PATCH bpf-next v4] bpf: fix lockdep warning triggered by stack_map_get_build_id_offset()
Date: Thu, 9 Sep 2021 14:33:15 +0100 [thread overview]
Message-ID: <YToNG9HaJYfGHusw@casper.infradead.org> (raw)
In-Reply-To: <20210909060245.2966358-1-yhs@fb.com>
On Wed, Sep 08, 2021 at 11:02:45PM -0700, Yonghong Song wrote:
> @@ -204,9 +204,10 @@ static void stack_map_get_build_id_offset(struct bpf_stack_build_id *id_offs,
> }
>
> if (!work) {
> - mmap_read_unlock_non_owner(current->mm);
> + mmap_read_unlock(current->mm);
> } else {
> work->mm = current->mm;
> + rwsem_release(¤t->mm->mmap_lock.dep_map, _RET_IP_);
> irq_work_queue(&work->irq_work);
This needs a comment before the rwsem_release(). Something like:
/*
* The lock will be released once we're out of interrupt
* context. Tell lockdep that we've released it now so
* it doesn't complain that we forgot to release it.
*/
next prev parent reply other threads:[~2021-09-09 13:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-09 6:02 Yonghong Song
2021-09-09 12:34 ` Jason Gunthorpe
2021-09-09 14:54 ` Yonghong Song
2021-09-09 13:33 ` Matthew Wilcox [this message]
2021-09-09 14:55 ` 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=YToNG9HaJYfGHusw@casper.infradead.org \
--to=willy@infradead.org \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=jgg@ziepe.ca \
--cc=kernel-team@fb.com \
--cc=linux-mm@kvack.org \
--cc=lrizzo@google.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