aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/vmcore.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/proc/vmcore.c')
-rw-r--r--fs/proc/vmcore.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/fs/proc/vmcore.c b/fs/proc/vmcore.c
index 0d5071d29985..41dd018f72dd 100644
--- a/fs/proc/vmcore.c
+++ b/fs/proc/vmcore.c
@@ -15,6 +15,7 @@
15#include <linux/export.h> 15#include <linux/export.h>
16#include <linux/slab.h> 16#include <linux/slab.h>
17#include <linux/highmem.h> 17#include <linux/highmem.h>
18#include <linux/printk.h>
18#include <linux/bootmem.h> 19#include <linux/bootmem.h>
19#include <linux/init.h> 20#include <linux/init.h>
20#include <linux/crash_dump.h> 21#include <linux/crash_dump.h>
@@ -553,8 +554,7 @@ static int __init parse_crash_elf64_headers(void)
553 ehdr.e_ehsize != sizeof(Elf64_Ehdr) || 554 ehdr.e_ehsize != sizeof(Elf64_Ehdr) ||
554 ehdr.e_phentsize != sizeof(Elf64_Phdr) || 555 ehdr.e_phentsize != sizeof(Elf64_Phdr) ||
555 ehdr.e_phnum == 0) { 556 ehdr.e_phnum == 0) {
556 printk(KERN_WARNING "Warning: Core image elf header is not" 557 pr_warn("Warning: Core image elf header is not sane\n");
557 "sane\n");
558 return -EINVAL; 558 return -EINVAL;
559 } 559 }
560 560
@@ -609,8 +609,7 @@ static int __init parse_crash_elf32_headers(void)
609 ehdr.e_ehsize != sizeof(Elf32_Ehdr) || 609 ehdr.e_ehsize != sizeof(Elf32_Ehdr) ||
610 ehdr.e_phentsize != sizeof(Elf32_Phdr) || 610 ehdr.e_phentsize != sizeof(Elf32_Phdr) ||
611 ehdr.e_phnum == 0) { 611 ehdr.e_phnum == 0) {
612 printk(KERN_WARNING "Warning: Core image elf header is not" 612 pr_warn("Warning: Core image elf header is not sane\n");
613 "sane\n");
614 return -EINVAL; 613 return -EINVAL;
615 } 614 }
616 615
@@ -653,8 +652,7 @@ static int __init parse_crash_elf_headers(void)
653 if (rc < 0) 652 if (rc < 0)
654 return rc; 653 return rc;
655 if (memcmp(e_ident, ELFMAG, SELFMAG) != 0) { 654 if (memcmp(e_ident, ELFMAG, SELFMAG) != 0) {
656 printk(KERN_WARNING "Warning: Core image elf header" 655 pr_warn("Warning: Core image elf header not found\n");
657 " not found\n");
658 return -EINVAL; 656 return -EINVAL;
659 } 657 }
660 658
@@ -673,8 +671,7 @@ static int __init parse_crash_elf_headers(void)
673 /* Determine vmcore size. */ 671 /* Determine vmcore size. */
674 vmcore_size = get_vmcore_size_elf32(elfcorebuf); 672 vmcore_size = get_vmcore_size_elf32(elfcorebuf);
675 } else { 673 } else {
676 printk(KERN_WARNING "Warning: Core image elf header is not" 674 pr_warn("Warning: Core image elf header is not sane\n");
677 " sane\n");
678 return -EINVAL; 675 return -EINVAL;
679 } 676 }
680 return 0; 677 return 0;
@@ -690,7 +687,7 @@ static int __init vmcore_init(void)
690 return rc; 687 return rc;
691 rc = parse_crash_elf_headers(); 688 rc = parse_crash_elf_headers();
692 if (rc) { 689 if (rc) {
693 printk(KERN_WARNING "Kdump: vmcore not initialized\n"); 690 pr_warn("Kdump: vmcore not initialized\n");
694 return rc; 691 return rc;
695 } 692 }
696 693