lkml.org 
[lkml]   [2003]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] swap 06/13 wrap below vm_start
objrmap must check lest address wrapped below vma->vm_start.

--- swap05/mm/rmap.c Tue Mar 25 20:43:40 2003
+++ swap06/mm/rmap.c Tue Mar 25 20:43:51 2003
@@ -100,12 +100,8 @@
unsigned long address;

loffset = (page->index << (PAGE_CACHE_SHIFT - PAGE_SHIFT));
- if (loffset < vma->vm_pgoff)
- goto out;
-
address = vma->vm_start + ((loffset - vma->vm_pgoff) << PAGE_SHIFT);
-
- if (address >= vma->vm_end)
+ if (address < vma->vm_start || address >= vma->vm_end)
goto out;

pgd = pgd_offset(mm, address);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:34    [W:0.215 / U:0.848 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site