BPF List
 help / color / mirror / Atom feed
From: Yonghong Song <yhs@fb.com>
To: Matthew Wilcox <willy@infradead.org>
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 07:55:10 -0700	[thread overview]
Message-ID: <196576d8-414e-8962-34e9-d1d7eb569133@fb.com> (raw)
In-Reply-To: <YToNG9HaJYfGHusw@casper.infradead.org>



On 9/9/21 6:33 AM, Matthew Wilcox wrote:
> 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(&current->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.
> 		 */

Thanks! Will add it in the next revision.

      reply	other threads:[~2021-09-09 14:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-09  6:02 [PATCH bpf-next v4] bpf: fix lockdep warning triggered by stack_map_get_build_id_offset() Yonghong Song
2021-09-09 12:34 ` Jason Gunthorpe
2021-09-09 14:54   ` Yonghong Song
2021-09-09 13:33 ` Matthew Wilcox
2021-09-09 14:55   ` Yonghong Song [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=196576d8-414e-8962-34e9-d1d7eb569133@fb.com \
    --to=yhs@fb.com \
    --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=willy@infradead.org \
    /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