mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-26 12:26:11 +00:00
[PATCH] fix remap_pte_range BUG
Out-of-tree user of remap_pfn_range hit kernel BUG at mm/memory.c:1112! It passes an unrounded size to remap_pfn_range, which was okay before 2.6.12, but misses remap_pte_range's new end condition. An audit of all the other ptwalks confirms that this is the only one so exposed. Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Chris Wright <chrisw@osdl.org>
This commit is contained in:
parent
906aa4d200
commit
986bd43014
1 changed files with 1 additions and 1 deletions
|
@ -1164,7 +1164,7 @@ int remap_pfn_range(struct vm_area_struct *vma, unsigned long addr,
|
|||
{
|
||||
pgd_t *pgd;
|
||||
unsigned long next;
|
||||
unsigned long end = addr + size;
|
||||
unsigned long end = addr + PAGE_ALIGN(size);
|
||||
struct mm_struct *mm = vma->vm_mm;
|
||||
int err;
|
||||
|
||||
|
|
Loading…
Reference in a new issue