linux-next: manual merge of the akpm tree with Linus' tree

Stephen Rothwell
2012-10-01T14:16:10Z

[-- Attachment #1: Type: text/plain, Size: 1057 bytes --]

Hi Andrew,

Today's linux-next merge of the akpm tree got a conflict in
drivers/mtd/mtdchar.c between commit 9c603e53d380 ("mtdchar: fix offset
overflow detection") from Linus' tree and commit "mm: kill vma flag
VM_RESERVED and mm->reserved_vm counter" from the akpm tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au

diff --cc drivers/mtd/mtdchar.c
index a6e7451,c4e01c5..0000000
--- a/drivers/mtd/mtdchar.c
+++ b/drivers/mtd/mtdchar.c
@@@ -1177,12 -1145,8 +1177,12 @@@ static int mtdchar_mmap(struct file *fi
return -EINVAL;

off += start;
- vma->vm_pgoff = off >> PAGE_SHIFT;
+ /* Did that overflow? */
+ if (off < start)
+ return -EINVAL;
+ if (set_vm_offset(vma, off) < 0)
+ return -EINVAL;
- vma->vm_flags |= VM_IO | VM_RESERVED;
+ vma->vm_flags |= VM_IO | VM_DONTEXPAND | VM_DONTDUMP;

#ifdef pgprot_noncached
if (file->f_flags & O_DSYNC || off >= __pa(high_memory))

[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]