[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20121002001557.0feca38df8a367ced5b3e322@canb.auug.org.au>
Date: Tue, 2 Oct 2012 00:15:57 +1000
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-next@...r.kernel.org, linux-kernel@...r.kernel.org,
Linus Torvalds <torvalds@...ux-foundation.org>,
Konstantin Khlebnikov <khlebnikov@...nvz.org>
Subject: linux-next: manual merge of the akpm tree with Linus' tree
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@...b.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))
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists