2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-14 00:04:00 +08:00

Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull perf fix from Thomas Gleixner:
 "The last fix for perf for this cycles:

   - Prevent a segfault when kernel.kptr_restrict=2 is set by avoiding a
     null pointer dereference"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf machine: Fix segfault for kernel.kptr_restrict=2
This commit is contained in:
Linus Torvalds 2017-07-01 08:46:52 -07:00
commit a527bf6140

View File

@ -1209,10 +1209,12 @@ int machine__create_kernel_maps(struct machine *machine)
*/ */
map_groups__fixup_end(&machine->kmaps); map_groups__fixup_end(&machine->kmaps);
if (machine__get_running_kernel_start(machine, &name, &addr)) { if (!machine__get_running_kernel_start(machine, &name, &addr)) {
} else if (maps__set_kallsyms_ref_reloc_sym(machine->vmlinux_maps, name, addr)) { if (name &&
machine__destroy_kernel_maps(machine); maps__set_kallsyms_ref_reloc_sym(machine->vmlinux_maps, name, addr)) {
return -1; machine__destroy_kernel_maps(machine);
return -1;
}
} }
return 0; return 0;