diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2017-05-12 13:45:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-05-12 13:45:36 -0400 |
commit | e0c4a5fc750e22c6f8d5c1ab7cc18592b88852ab (patch) | |
tree | b4ca5dfc9208be7f789786f16e2c0fde1e15547b /kernel | |
parent | dfcb7b2379ff90afb9231da040046f4b9eb1c895 (diff) | |
parent | 88b0193d9418c00340e45e0a913a0813bc6c8c96 (diff) |
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf updates/fixes from Ingo Molnar:
"Mostly tooling updates, but also two kernel fixes: a call chain
handling robustness fix and an x86 PMU driver event definition fix"
* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
perf/callchain: Force USER_DS when invoking perf_callchain_user()
tools build: Fixup sched_getcpu feature test
perf tests kmod-path: Don't fail if compressed modules aren't supported
perf annotate: Fix AArch64 comment char
perf tools: Fix spelling mistakes
perf/x86: Fix Broadwell-EP DRAM RAPL events
perf config: Refactor a duplicated code for obtaining config file name
perf symbols: Allow user probes on versioned symbols
perf symbols: Accept symbols starting at address 0
tools lib string: Adopt prefixcmp() from perf and subcmd
perf units: Move parse_tag_value() to units.[ch]
perf ui gtk: Move gtk .so name to the only place where it is used
perf tools: Move HAS_BOOL define to where perl headers are used
perf memswap: Split the byteswap memory range wrappers from util.[ch]
perf tools: Move event prototypes from util.h to event.h
perf buildid: Move prototypes from util.h to build-id.h
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/events/callchain.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/kernel/events/callchain.c b/kernel/events/callchain.c index c04917cad1bf..1b2be63c8528 100644 --- a/kernel/events/callchain.c +++ b/kernel/events/callchain.c | |||
@@ -229,12 +229,18 @@ get_perf_callchain(struct pt_regs *regs, u32 init_nr, bool kernel, bool user, | |||
229 | } | 229 | } |
230 | 230 | ||
231 | if (regs) { | 231 | if (regs) { |
232 | mm_segment_t fs; | ||
233 | |||
232 | if (crosstask) | 234 | if (crosstask) |
233 | goto exit_put; | 235 | goto exit_put; |
234 | 236 | ||
235 | if (add_mark) | 237 | if (add_mark) |
236 | perf_callchain_store_context(&ctx, PERF_CONTEXT_USER); | 238 | perf_callchain_store_context(&ctx, PERF_CONTEXT_USER); |
239 | |||
240 | fs = get_fs(); | ||
241 | set_fs(USER_DS); | ||
237 | perf_callchain_user(&ctx, regs); | 242 | perf_callchain_user(&ctx, regs); |
243 | set_fs(fs); | ||
238 | } | 244 | } |
239 | } | 245 | } |
240 | 246 | ||