Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 210991
b: refs/heads/master
c: 5ec1055
h: refs/heads/master
i:
  210989: bc42908
  210987: 98d8e00
  210983: 13a8696
  210975: b1368f6
v: v3
  • Loading branch information
Larry Woodman authored and Linus Torvalds committed Sep 25, 2010
1 parent 8c4a058 commit 0e783a3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8ae09259ffe2402e956efd5a36220b6161e9ecb3
refs/heads/master: 5ec1055aa5632dd7a8283cdb5fa9be3c535eaa06
4 changes: 4 additions & 0 deletions trunk/mm/fremap.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
if (start + size <= start)
return err;

/* Does pgoff wrap? */
if (pgoff + (size >> PAGE_SHIFT) < pgoff)
return err;

/* Can we represent this offset inside this architecture's pte's? */
#if PTE_FILE_MAX_BITS < BITS_PER_LONG
if (pgoff + (size >> PAGE_SHIFT) >= (1UL << PTE_FILE_MAX_BITS))
Expand Down

0 comments on commit 0e783a3

Please sign in to comment.