Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 210978
b: refs/heads/master
c: e92b05d
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Sep 24, 2010
1 parent f78dbc6 commit 892912d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d1f3e68efb4c98fa229b39ff09a8984ef16cafa4
refs/heads/master: e92b05dec8865619ea2608c5c11a54b01467482f
3 changes: 1 addition & 2 deletions trunk/mm/fremap.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
{
struct mm_struct *mm = current->mm;
struct address_space *mapping;
unsigned long end = start + size;
struct vm_area_struct *vma;
int err = -EINVAL;
int has_write_lock = 0;
Expand Down Expand Up @@ -168,7 +167,7 @@ SYSCALL_DEFINE5(remap_file_pages, unsigned long, start, unsigned long, size,
if (!(vma->vm_flags & VM_CAN_NONLINEAR))
goto out;

if (end <= start || start < vma->vm_start || end > vma->vm_end)
if (start < vma->vm_start || start + size > vma->vm_end)
goto out;

/* Must set VM_NONLINEAR before any pages are populated. */
Expand Down

0 comments on commit 892912d

Please sign in to comment.