Skip to content

Commit

Permalink
ima-demonstration-code-for-kexec-buffer-passing-checkpatch-fixes
Browse files Browse the repository at this point in the history
ERROR: do not initialise globals to NULL
torvalds#168: FILE: security/integrity/ima/ima_template.c:188:
+void *kexec_buffer = NULL;

ERROR: do not initialise globals to 0
torvalds#169: FILE: security/integrity/ima/ima_template.c:189:
+size_t kexec_buffer_size = 0;

ERROR: do not initialise globals to 0
torvalds#172: FILE: security/integrity/ima/ima_template.c:192:
+unsigned long kexec_buffer_load_addr = 0;

total: 3 errors, 0 warnings, 196 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

./patches/ima-demonstration-code-for-kexec-buffer-passing.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Thiago Jung Bauermann <bauerman@linux.vnet.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
  • Loading branch information
akpm00 authored and hnaz committed Aug 26, 2016
1 parent 79986ab commit 9d1d2a0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions security/integrity/ima/ima_template.c
Original file line number Diff line number Diff line change
Expand Up @@ -185,11 +185,11 @@ static int template_desc_init_fields(const char *template_fmt,
}

#ifdef CONFIG_KEXEC_FILE
void *kexec_buffer = NULL;
size_t kexec_buffer_size = 0;
void *kexec_buffer;
size_t kexec_buffer_size;

/* Physical address of the measurement buffer in the next kernel. */
unsigned long kexec_buffer_load_addr = 0;
unsigned long kexec_buffer_load_addr;

/*
* Called during reboot. IMA can add here new events that were generated after
Expand Down

0 comments on commit 9d1d2a0

Please sign in to comment.