summaryrefslogtreecommitdiff
path: root/kernel/events/core.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2018-09-18 17:20:41 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2018-09-18 17:20:41 -0300
commit7f16023bfcc4b1f2bbccf86219dc97473db6e0d6 (patch)
tree0abbfba738d76af7a2af067f6c4cec901c2d3c13 /kernel/events/core.c
parent49e73246cbe6fe0df9cae2db87f31cdc3a0b2b61 (diff)
parent169e366c08084aeb49a3793c892c9abfaa47eeda (diff)
Merge remote-tracking branch 'acme/perf/urgent' into perf/core
To pick up fixes. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'kernel/events/core.c')
-rw-r--r--kernel/events/core.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/events/core.c b/kernel/events/core.c
index abaed4f8bb7f..c80549bf82c6 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -5943,6 +5943,7 @@ perf_output_sample_ustack(struct perf_output_handle *handle, u64 dump_size,
unsigned long sp;
unsigned int rem;
u64 dyn_size;
+ mm_segment_t fs;
/*
* We dump:
@@ -5960,7 +5961,10 @@ perf_output_sample_ustack(struct perf_output_handle *handle, u64 dump_size,
/* Data. */
sp = perf_user_stack_pointer(regs);
+ fs = get_fs();
+ set_fs(USER_DS);
rem = __output_copy_user(handle, (void *) sp, dump_size);
+ set_fs(fs);
dyn_size = dump_size - rem;
perf_output_skip(handle, rem);