/[linux-patches]/genpatches-2.6/trunk/2.6.12/1905_mm-BUG.patch
Gentoo

Contents of /genpatches-2.6/trunk/2.6.12/1905_mm-BUG.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 50 - (show annotations) (download)
Thu Jun 23 10:49:32 2005 UTC (12 years, 11 months ago) by dsd
File size: 1054 byte(s)
Fix remap_pte_range BUG
1 From stable-bounces@linux.kernel.org Wed Jun 22 06:01:48 2005
2 Date: Wed, 22 Jun 2005 14:02:41 +0100 (BST)
3 From: Hugh Dickins <hugh@veritas.com>
4 To: Andrew Morton <akpm@osdl.org>
5 Cc: "Richard B. Johnson" <linux-os@analogic.com>, stable@kernel.org,
6 linux-kernel@vger.kernel.org
7 Subject: [PATCH] fix remap_pte_range BUG
8
9 Out-of-tree user of remap_pfn_range hit kernel BUG at mm/memory.c:1112!
10 It passes an unrounded size to remap_pfn_range, which was okay before
11 2.6.12, but misses remap_pte_range's new end condition. An audit of
12 all the other ptwalks confirms that this is the only one so exposed.
13
14 Signed-off-by: Hugh Dickins <hugh@veritas.com>
15 Signed-off-by: Chris Wright <chrisw@osdl.org>
16
17 --- 2.6.12/mm/memory.c 2005-06-17 20:48:29.000000000 +0100
18 +++ linux/mm/memory.c 2005-06-21 20:31:42.000000000 +0100
19 @@ -1164,7 +1164,7 @@ int remap_pfn_range(struct vm_area_struc
20 {
21 pgd_t *pgd;
22 unsigned long next;
23 - unsigned long end = addr + size;
24 + unsigned long end = addr + PAGE_ALIGN(size);
25 struct mm_struct *mm = vma->vm_mm;
26 int err;
27
28

  ViewVC Help
Powered by ViewVC 1.1.20