aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/events/ring_buffer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/events/ring_buffer.c b/kernel/events/ring_buffer.c
index 4b5f8d932400..7a0c73e4b3eb 100644
--- a/kernel/events/ring_buffer.c
+++ b/kernel/events/ring_buffer.c
@@ -100,7 +100,7 @@ again:
100 * See perf_output_begin(). 100 * See perf_output_begin().
101 */ 101 */
102 smp_wmb(); /* B, matches C */ 102 smp_wmb(); /* B, matches C */
103 rb->user_page->data_head = head; 103 WRITE_ONCE(rb->user_page->data_head, head);
104 104
105 /* 105 /*
106 * We must publish the head before decrementing the nest count, 106 * We must publish the head before decrementing the nest count,
@@ -496,7 +496,7 @@ void perf_aux_output_end(struct perf_output_handle *handle, unsigned long size)
496 perf_event_aux_event(handle->event, aux_head, size, 496 perf_event_aux_event(handle->event, aux_head, size,
497 handle->aux_flags); 497 handle->aux_flags);
498 498
499 rb->user_page->aux_head = rb->aux_head; 499 WRITE_ONCE(rb->user_page->aux_head, rb->aux_head);
500 if (rb_need_aux_wakeup(rb)) 500 if (rb_need_aux_wakeup(rb))
501 wakeup = true; 501 wakeup = true;
502 502
@@ -528,7 +528,7 @@ int perf_aux_output_skip(struct perf_output_handle *handle, unsigned long size)
528 528
529 rb->aux_head += size; 529 rb->aux_head += size;
530 530
531 rb->user_page->aux_head = rb->aux_head; 531 WRITE_ONCE(rb->user_page->aux_head, rb->aux_head);
532 if (rb_need_aux_wakeup(rb)) { 532 if (rb_need_aux_wakeup(rb)) {
533 perf_output_wakeup(handle); 533 perf_output_wakeup(handle);
534 handle->wakeup = rb->aux_wakeup + rb->aux_watermark; 534 handle->wakeup = rb->aux_wakeup + rb->aux_watermark;