summaryrefslogtreecommitdiff
path: root/kernel/trace/trace.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@google.com>2021-04-10 14:14:02 +0200
committerGreg Kroah-Hartman <gregkh@google.com>2021-04-10 14:14:02 +0200
commit3078eb2aede4db1b77d1a162473113d693aec120 (patch)
tree5333fa72066046797f488467676e0d48caf7143f /kernel/trace/trace.c
parent816b5bcff6fe2e18ee7e30a300c13e1e97d51f23 (diff)
parent23a86a94a323fdd1c3ca7cf6dc032dd380db8658 (diff)
Merge 4.4.266 into android-4.4-p
Changes in 4.4.266 net: pxa168_eth: Fix a potential data race in pxa168_eth_remove mISDN: fix crash in fritzpci mac80211: choose first enabled channel for monitor x86/build: Turn off -fcf-protection for realmode targets ia64: mca: allocate early mca with GFP_ATOMIC cifs: revalidate mapping when we open files for SMB1 POSIX cifs: Silently ignore unknown oplock break handle bpf, x86: Validate computation of branch displacements for x86-64 ALSA: hda/realtek - Fix pincfg for Dell XPS 13 9370 mtd: rawnand: tmio: Fix the probe error path mtd: rawnand: socrates: Fix the probe error path mtd: rawnand: sharpsl: Fix the probe error path mtd: rawnand: plat_nand: Fix the probe error path mtd: rawnand: pasemi: Fix the probe error path mtd: rawnand: orion: Fix the probe error path mtd: rawnand: diskonchip: Fix the probe error path tracing: Add a vmalloc_sync_mappings() for safe measure init/Kconfig: make COMPILE_TEST depend on !UML init/Kconfig: make COMPILE_TEST depend on !S390 init/Kconfig: make COMPILE_TEST depend on HAS_IOMEM can: flexcan: flexcan_chip_freeze(): fix chip freeze for missing bitrate Linux 4.4.266 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: I883b5323d84e86d2e3cefb8febdfa92c6e61c3fd
Diffstat (limited to 'kernel/trace/trace.c')
-rw-r--r--kernel/trace/trace.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 5e6998b2019e..49af30a36330 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -26,6 +26,7 @@
#include <linux/linkage.h>
#include <linux/uaccess.h>
#include <linux/kprobes.h>
+#include <linux/vmalloc.h>
#include <linux/ftrace.h>
#include <linux/module.h>
#include <linux/percpu.h>
@@ -6717,6 +6718,19 @@ static int allocate_trace_buffers(struct trace_array *tr, int size)
*/
allocate_snapshot = false;
#endif
+
+ /*
+ * Because of some magic with the way alloc_percpu() works on
+ * x86_64, we need to synchronize the pgd of all the tables,
+ * otherwise the trace events that happen in x86_64 page fault
+ * handlers can't cope with accessing the chance that a
+ * alloc_percpu()'d memory might be touched in the page fault trace
+ * event. Oh, and we need to audit all other alloc_percpu() and vmalloc()
+ * calls in tracing, because something might get triggered within a
+ * page fault trace event!
+ */
+ vmalloc_sync_mappings();
+
return 0;
}