diff options
author | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2017-10-09 14:08:53 -0400 |
---|---|---|
committer | Paul E. McKenney <paulmck@linux.vnet.ibm.com> | 2017-12-04 13:52:55 -0500 |
commit | 5c6338b4877038d28148fcfe1e7f862970ebaad1 (patch) | |
tree | 38ed99c3d851c3d82efb1d9e02322ea80dd73122 | |
parent | 98b22737847cc015a797567e32d0a4826003afbf (diff) |
uprobes: Remove now-redundant smp_read_barrier_depends()
Now that READ_ONCE() implies smp_read_barrier_depends(), the
get_xol_area() and get_trampoline_vaddr() no longer need their
smp_read_barrier_depends() calls, which this commit removes.
While we are here, convert the corresponding smp_wmb() to an
smp_store_release().
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
-rw-r--r-- | kernel/events/uprobes.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c index 267f6ef91d97..ce6848e46e94 100644 --- a/kernel/events/uprobes.c +++ b/kernel/events/uprobes.c | |||
@@ -1167,8 +1167,8 @@ static int xol_add_vma(struct mm_struct *mm, struct xol_area *area) | |||
1167 | } | 1167 | } |
1168 | 1168 | ||
1169 | ret = 0; | 1169 | ret = 0; |
1170 | smp_wmb(); /* pairs with get_xol_area() */ | 1170 | /* pairs with get_xol_area() */ |
1171 | mm->uprobes_state.xol_area = area; | 1171 | smp_store_release(&mm->uprobes_state.xol_area, area); /* ^^^ */ |
1172 | fail: | 1172 | fail: |
1173 | up_write(&mm->mmap_sem); | 1173 | up_write(&mm->mmap_sem); |
1174 | 1174 | ||
@@ -1230,8 +1230,8 @@ static struct xol_area *get_xol_area(void) | |||
1230 | if (!mm->uprobes_state.xol_area) | 1230 | if (!mm->uprobes_state.xol_area) |
1231 | __create_xol_area(0); | 1231 | __create_xol_area(0); |
1232 | 1232 | ||
1233 | area = mm->uprobes_state.xol_area; | 1233 | /* Pairs with xol_add_vma() smp_store_release() */ |
1234 | smp_read_barrier_depends(); /* pairs with wmb in xol_add_vma() */ | 1234 | area = READ_ONCE(mm->uprobes_state.xol_area); /* ^^^ */ |
1235 | return area; | 1235 | return area; |
1236 | } | 1236 | } |
1237 | 1237 | ||
@@ -1528,8 +1528,8 @@ static unsigned long get_trampoline_vaddr(void) | |||
1528 | struct xol_area *area; | 1528 | struct xol_area *area; |
1529 | unsigned long trampoline_vaddr = -1; | 1529 | unsigned long trampoline_vaddr = -1; |
1530 | 1530 | ||
1531 | area = current->mm->uprobes_state.xol_area; | 1531 | /* Pairs with xol_add_vma() smp_store_release() */ |
1532 | smp_read_barrier_depends(); | 1532 | area = READ_ONCE(current->mm->uprobes_state.xol_area); /* ^^^ */ |
1533 | if (area) | 1533 | if (area) |
1534 | trampoline_vaddr = area->vaddr; | 1534 | trampoline_vaddr = area->vaddr; |
1535 | 1535 | ||