aboutsummaryrefslogtreecommitdiff
path: root/kernel/bpf/stackmap.c
diff options
context:
space:
mode:
authorSean Paul <[email protected]>2019-03-06 09:22:18 -0500
committerSean Paul <[email protected]>2019-03-06 09:22:18 -0500
commitcd7d3a1bb42e0756b17ccfafbd956ca7ed757846 (patch)
treefb76fd0ccaaaa3f27ef0a06ecf3d04ebe9d4025d /kernel/bpf/stackmap.c
parent6b5c029df5e40704a6642e026e709dd0dec44622 (diff)
parent4b057e73f28f1df13b77b77a52094238ffdf8abd (diff)
Merge drm/drm-next into drm-misc-next
Picking up v5.0 + missed misc-fixes from last release Signed-off-by: Sean Paul <[email protected]>
Diffstat (limited to 'kernel/bpf/stackmap.c')
-rw-r--r--kernel/bpf/stackmap.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/kernel/bpf/stackmap.c b/kernel/bpf/stackmap.c
index d43b14535827..950ab2f28922 100644
--- a/kernel/bpf/stackmap.c
+++ b/kernel/bpf/stackmap.c
@@ -44,7 +44,7 @@ static void do_up_read(struct irq_work *entry)
struct stack_map_irq_work *work;
work = container_of(entry, struct stack_map_irq_work, irq_work);
- up_read(work->sem);
+ up_read_non_owner(work->sem);
work->sem = NULL;
}
@@ -338,6 +338,12 @@ static void stack_map_get_build_id_offset(struct bpf_stack_build_id *id_offs,
} else {
work->sem = &current->mm->mmap_sem;
irq_work_queue(&work->irq_work);
+ /*
+ * The irq_work will release the mmap_sem with
+ * up_read_non_owner(). The rwsem_release() is called
+ * here to release the lock from lockdep's perspective.
+ */
+ rwsem_release(&current->mm->mmap_sem.dep_map, 1, _RET_IP_);
}
}