aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2013-02-23 12:55:39 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2013-02-23 12:55:39 -0500
commitf6604efe0bee759f4db34757f2872b611288ef0f (patch)
treef6bfff630be275291be6db763bdc5c9c9d406e52 /arch
parentd3f79584a8b59a6760a8fe465b22e54081eaeb5e (diff)
ARM: cleanup gate_vma initialization
Three's no need to have code initializing this by hand; it's more efficient to initialize the constant structure members directly. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/kernel/process.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/arch/arm/kernel/process.c b/arch/arm/kernel/process.c
index c6dec5fc20aa..9397069af175 100644
--- a/arch/arm/kernel/process.c
+++ b/arch/arm/kernel/process.c
@@ -464,15 +464,16 @@ unsigned long arch_randomize_brk(struct mm_struct *mm)
464 * atomic helpers and the signal restart code. Insert it into the 464 * atomic helpers and the signal restart code. Insert it into the
465 * gate_vma so that it is visible through ptrace and /proc/<pid>/mem. 465 * gate_vma so that it is visible through ptrace and /proc/<pid>/mem.
466 */ 466 */
467static struct vm_area_struct gate_vma; 467static struct vm_area_struct gate_vma = {
468 .vm_start = 0xffff0000,
469 .vm_end = 0xffff0000 + PAGE_SIZE,
470 .vm_flags = VM_READ | VM_EXEC | VM_MAYREAD | VM_MAYEXEC,
471 .vm_mm = &init_mm,
472};
468 473
469static int __init gate_vma_init(void) 474static int __init gate_vma_init(void)
470{ 475{
471 gate_vma.vm_start = 0xffff0000; 476 gate_vma.vm_page_prot = PAGE_READONLY_EXEC;
472 gate_vma.vm_end = 0xffff0000 + PAGE_SIZE;
473 gate_vma.vm_page_prot = PAGE_READONLY_EXEC;
474 gate_vma.vm_flags = VM_READ | VM_EXEC |
475 VM_MAYREAD | VM_MAYEXEC;
476 return 0; 477 return 0;
477} 478}
478arch_initcall(gate_vma_init); 479arch_initcall(gate_vma_init);