]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
ARM: ecard: ensure fake vma vm_flags is setup
authorRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 5 Mar 2012 23:29:51 +0000 (23:29 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Mon, 5 Mar 2012 23:29:51 +0000 (23:29 +0000)
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>
arch/arm/kernel/ecard.c

index 4dd0edab6a658880ed505145fff2c5ce001ae639..1651d49507444267e1d5bf5783837e0f1d483420 100644 (file)
@@ -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);