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(¤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.
*/
Thanks! Will add it in the next revision.