diff options
| author | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2021-10-12 12:03:58 -0400 |
|---|---|---|
| committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2021-10-12 12:03:58 -0400 |
| commit | d9f673051ab54dd5263fef6da97ef08feedaa754 (patch) | |
| tree | 6d7e19bd3345bd43e3488d17f6cb60ff16289b3d /kernel/bpf/stackmap.c | |
| parent | 814c8757115f9d7135126ac43d3a178b31e796dd (diff) | |
| parent | 1176d15f0f6e556d54ced510ac4a91694960332b (diff) | |
| download | cachepc-linux-d9f673051ab54dd5263fef6da97ef08feedaa754.tar.gz cachepc-linux-d9f673051ab54dd5263fef6da97ef08feedaa754.zip | |
Merge drm/drm-next into drm-intel-next
Need to resync drm-intel-next with TTM and PXP stuff from
drm-intel-gt-next that is now in drm/drm-next.
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Diffstat (limited to 'kernel/bpf/stackmap.c')
| -rw-r--r-- | kernel/bpf/stackmap.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/kernel/bpf/stackmap.c b/kernel/bpf/stackmap.c index e8eefdf8cf3e..09a3fd97d329 100644 --- a/kernel/bpf/stackmap.c +++ b/kernel/bpf/stackmap.c @@ -179,7 +179,7 @@ static void stack_map_get_build_id_offset(struct bpf_stack_build_id *id_offs, * with build_id. */ if (!user || !current || !current->mm || irq_work_busy || - !mmap_read_trylock_non_owner(current->mm)) { + !mmap_read_trylock(current->mm)) { /* cannot access current->mm, fall back to ips */ for (i = 0; i < trace_nr; i++) { id_offs[i].status = BPF_STACK_BUILD_ID_IP; @@ -204,9 +204,15 @@ 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; + + /* 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. + */ + rwsem_release(¤t->mm->mmap_lock.dep_map, _RET_IP_); irq_work_queue(&work->irq_work); } } |
