diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-07-17 11:58:04 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-07-17 11:58:04 -0400 |
commit | 57a8ec387e1441ea5e1232bc0749fb99a8cba7e7 (patch) | |
tree | b5fb03fc6bc5754de8b5b1f8b0e4f36d67c8315c /fs/proc/vmcore.c | |
parent | 0a8ad0ffa4d80a544f6cbff703bf6394339afcdf (diff) | |
parent | 43e11fa2d1d3b6e35629fa556eb7d571edba2010 (diff) |
Merge branch 'akpm' (patches from Andrew)
Merge more updates from Andrew Morton:
"VM:
- z3fold fixes and enhancements by Henry Burns and Vitaly Wool
- more accurate reclaimed slab caches calculations by Yafang Shao
- fix MAP_UNINITIALIZED UAPI symbol to not depend on config, by
Christoph Hellwig
- !CONFIG_MMU fixes by Christoph Hellwig
- new novmcoredd parameter to omit device dumps from vmcore, by
Kairui Song
- new test_meminit module for testing heap and pagealloc
initialization, by Alexander Potapenko
- ioremap improvements for huge mappings, by Anshuman Khandual
- generalize kprobe page fault handling, by Anshuman Khandual
- device-dax hotplug fixes and improvements, by Pavel Tatashin
- enable synchronous DAX fault on powerpc, by Aneesh Kumar K.V
- add pte_devmap() support for arm64, by Robin Murphy
- unify locked_vm accounting with a helper, by Daniel Jordan
- several misc fixes
core/lib:
- new typeof_member() macro including some users, by Alexey Dobriyan
- make BIT() and GENMASK() available in asm, by Masahiro Yamada
- changed LIST_POISON2 on x86_64 to 0xdead000000000122 for better
code generation, by Alexey Dobriyan
- rbtree code size optimizations, by Michel Lespinasse
- convert struct pid count to refcount_t, by Joel Fernandes
get_maintainer.pl:
- add --no-moderated switch to skip moderated ML's, by Joe Perches
misc:
- ptrace PTRACE_GET_SYSCALL_INFO interface
- coda updates
- gdb scripts, various"
[ Using merge message suggestion from Vlastimil Babka, with some editing - Linus ]
* emailed patches from Andrew Morton <akpm@linux-foundation.org>: (100 commits)
fs/select.c: use struct_size() in kmalloc()
mm: add account_locked_vm utility function
arm64: mm: implement pte_devmap support
mm: introduce ARCH_HAS_PTE_DEVMAP
mm: clean up is_device_*_page() definitions
mm/mmap: move common defines to mman-common.h
mm: move MAP_SYNC to asm-generic/mman-common.h
device-dax: "Hotremove" persistent memory that is used like normal RAM
mm/hotplug: make remove_memory() interface usable
device-dax: fix memory and resource leak if hotplug fails
include/linux/lz4.h: fix spelling and copy-paste errors in documentation
ipc/mqueue.c: only perform resource calculation if user valid
include/asm-generic/bug.h: fix "cut here" for WARN_ON for __WARN_TAINT architectures
scripts/gdb: add helpers to find and list devices
scripts/gdb: add lx-genpd-summary command
drivers/pps/pps.c: clear offset flags in PPS_SETPARAMS ioctl
kernel/pid.c: convert struct pid count to refcount_t
drivers/rapidio/devices/rio_mport_cdev.c: NUL terminate some strings
select: shift restore_saved_sigmask_unless() into poll_select_copy_remaining()
select: change do_poll() to return -ERESTARTNOHAND rather than -EINTR
...
Diffstat (limited to 'fs/proc/vmcore.c')
-rw-r--r-- | fs/proc/vmcore.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c index 57957c91c6df..7bcc92add72c 100644 --- a/fs/proc/vmcore.c +++ b/fs/proc/vmcore.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/init.h> | 21 | #include <linux/init.h> |
22 | #include <linux/crash_dump.h> | 22 | #include <linux/crash_dump.h> |
23 | #include <linux/list.h> | 23 | #include <linux/list.h> |
24 | #include <linux/moduleparam.h> | ||
24 | #include <linux/mutex.h> | 25 | #include <linux/mutex.h> |
25 | #include <linux/vmalloc.h> | 26 | #include <linux/vmalloc.h> |
26 | #include <linux/pagemap.h> | 27 | #include <linux/pagemap.h> |
@@ -54,6 +55,9 @@ static struct proc_dir_entry *proc_vmcore; | |||
54 | /* Device Dump list and mutex to synchronize access to list */ | 55 | /* Device Dump list and mutex to synchronize access to list */ |
55 | static LIST_HEAD(vmcoredd_list); | 56 | static LIST_HEAD(vmcoredd_list); |
56 | static DEFINE_MUTEX(vmcoredd_mutex); | 57 | static DEFINE_MUTEX(vmcoredd_mutex); |
58 | |||
59 | static bool vmcoredd_disabled; | ||
60 | core_param(novmcoredd, vmcoredd_disabled, bool, 0); | ||
57 | #endif /* CONFIG_PROC_VMCORE_DEVICE_DUMP */ | 61 | #endif /* CONFIG_PROC_VMCORE_DEVICE_DUMP */ |
58 | 62 | ||
59 | /* Device Dump Size */ | 63 | /* Device Dump Size */ |
@@ -1452,6 +1456,11 @@ int vmcore_add_device_dump(struct vmcoredd_data *data) | |||
1452 | size_t data_size; | 1456 | size_t data_size; |
1453 | int ret; | 1457 | int ret; |
1454 | 1458 | ||
1459 | if (vmcoredd_disabled) { | ||
1460 | pr_err_once("Device dump is disabled\n"); | ||
1461 | return -EINVAL; | ||
1462 | } | ||
1463 | |||
1455 | if (!data || !strlen(data->dump_name) || | 1464 | if (!data || !strlen(data->dump_name) || |
1456 | !data->vmcoredd_callback || !data->size) | 1465 | !data->vmcoredd_callback || !data->size) |
1457 | return -EINVAL; | 1466 | return -EINVAL; |