Skip to content

Commit

Permalink
ARM: ecard: ensure fake vma vm_flags is setup
Browse files Browse the repository at this point in the history
Our TLB ops want to check the vma vm_flags to find out whether the
mapping is executable.  However, we leave this uninitialized in
ecard.c.  Initialize it with an appropriate value.

Reported-by: Al Viro <viro@ftp.linux.org.uk>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Russell King committed Mar 5, 2012
1 parent 43a6955 commit 81caaf2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions arch/arm/kernel/ecard.c
Expand Up @@ -242,6 +242,7 @@ static void ecard_init_pgtables(struct mm_struct *mm)

memcpy(dst_pgd, src_pgd, sizeof(pgd_t) * (EASI_SIZE / PGDIR_SIZE));

vma.vm_flags = VM_EXEC;
vma.vm_mm = mm;

flush_tlb_range(&vma, IO_START, IO_START + IO_SIZE);
Expand Down

0 comments on commit 81caaf2

Please sign in to comment.