Skip to content

Commit

Permalink
fs-elf-drop-map_fixed-usage-from-elf_map-checkpatch-fixes
Browse files Browse the repository at this point in the history
ERROR: Please use git commit description style 'commit <12+ chars of sha1> ("<title line>")' - ie: 'commit 0123456789ab ("commit description")'
torvalds#8:
(before eab0953 ("binfmt_elf: use ELF_ET_DYN_BASE only for PIE"))

ERROR: Please use git commit description style 'commit <12+ chars of sha1> ("<title line>")' - ie: 'commit 0123456789ab ("commit description")'
torvalds#15:
further from the stack (eab0953 and later by c715b72 ("mm:

ERROR: Please use git commit description style 'commit <12+ chars of sha1> ("<title line>")' - ie: 'commit 0123456789ab ("commit description")'
torvalds#17:
stack consumption early during execve fully stopped by da029c1

WARNING: 'segement' may be misspelled - perhaps 'segment'?
torvalds#64: FILE: arch/metag/kernel/process.c:421:
+		pr_info("%d (%s): Uhuuh, elf segement at %p requested but the memory is mapped already\n",

ERROR: "(foo*)" should be "(foo *)"
torvalds#65: FILE: arch/metag/kernel/process.c:422:
+				task_pid_nr(current), tsk->comm, (void*)addr);

WARNING: 'segement' may be misspelled - perhaps 'segment'?
torvalds#78: FILE: fs/binfmt_elf.c:381:
+		pr_info("%d (%s): Uhuuh, elf segement at %p requested but the memory is mapped already\n",

WARNING: line over 80 characters
torvalds#79: FILE: fs/binfmt_elf.c:382:
+				task_pid_nr(current), current->comm, (void*)addr);

ERROR: "(foo*)" should be "(foo *)"
torvalds#79: FILE: fs/binfmt_elf.c:382:
+				task_pid_nr(current), current->comm, (void*)addr);

total: 5 errors, 3 warnings, 60 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/fs-elf-drop-map_fixed-usage-from-elf_map.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: Michal Hocko <mhocko@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
  • Loading branch information
akpm00 authored and sfrothwell committed Jan 5, 2018
1 parent b8093f6 commit 18bc185
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions arch/metag/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,8 @@ unsigned long __metag_elf_map(struct file *filep, unsigned long addr,
map_addr = vm_mmap(filep, addr, size, prot, type, off);

if ((type & MAP_FIXED_NOREPLACE) && BAD_ADDR(map_addr))
pr_info("%d (%s): Uhuuh, elf segement at %p requested but the memory is mapped already\n",
task_pid_nr(current), tsk->comm, (void*)addr);
pr_info("%d (%s): Uhuuh, elf segment at %p requested but the memory is mapped already\n",
task_pid_nr(current), tsk->comm, (void *)addr);

if (!BAD_ADDR(map_addr) && tcm_tag != TCM_INVALID_TAG) {
struct tcm_allocation *tcm;
Expand Down
5 changes: 3 additions & 2 deletions fs/binfmt_elf.c
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,9 @@ static unsigned long elf_map(struct file *filep, unsigned long addr,
map_addr = vm_mmap(filep, addr, size, prot, type, off);

if ((type & MAP_FIXED_NOREPLACE) && BAD_ADDR(map_addr))
pr_info("%d (%s): Uhuuh, elf segement at %p requested but the memory is mapped already\n",
task_pid_nr(current), current->comm, (void*)addr);
pr_info("%d (%s): Uhuuh, elf segment at %p requested but the memory is mapped already\n",
task_pid_nr(current), current->comm,
(void *)addr);

return(map_addr);
}
Expand Down

0 comments on commit 18bc185

Please sign in to comment.