[merged] mm-bootmem-fix-checking-the-bitmap-when-finally-freeing-bootmem.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: mm: bootmem: fix checking the bitmap when finally freeing bootmem
has been removed from the -mm tree.  Its filename was
     mm-bootmem-fix-checking-the-bitmap-when-finally-freeing-bootmem.patch

This patch was dropped because it was merged into mainline or a subsystem tree

The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/

------------------------------------------------------
From: Gavin Shan <shangw@xxxxxxxxxxxxxxxxxx>
Subject: mm: bootmem: fix checking the bitmap when finally freeing bootmem

When bootmem releases an unaligned chunk of memory at the beginning of a
node to the page allocator, it iterates from that unaligned PFN but checks
an aligned word of the page bitmap.  The checked bits do not correspond to
the PFNs and, as a result, reserved pages can be freed.

Properly shift the bitmap word so that the lowest bit corresponds to the
starting PFN before entering the freeing loop.

This bug has been around since 41546c1 ("bootmem: clean up
free_all_bootmem_core") (2.6.27) without known reports.

Signed-off-by: Gavin Shan <shangw@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Johannes Weiner <hannes@xxxxxxxxxxx>
Acked-by: Tejun Heo <tj@xxxxxxxxxx>
Acked-by: David S. Miller <davem@xxxxxxxxxxxxx>
Cc: Yinghai Lu <yinghai@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 mm/bootmem.c |    1 +
 1 file changed, 1 insertion(+)

diff -puN mm/bootmem.c~mm-bootmem-fix-checking-the-bitmap-when-finally-freeing-bootmem mm/bootmem.c
--- a/mm/bootmem.c~mm-bootmem-fix-checking-the-bitmap-when-finally-freeing-bootmem
+++ a/mm/bootmem.c
@@ -203,6 +203,7 @@ static unsigned long __init free_all_boo
 		} else {
 			unsigned long off = 0;
 
+			vec >>= start & (BITS_PER_LONG - 1);
 			while (vec && off < BITS_PER_LONG) {
 				if (vec & 1) {
 					page = pfn_to_page(start + off);
_

Patches currently in -mm which might be from shangw@xxxxxxxxxxxxxxxxxx are

origin.patch
mm-slab-remove-duplicate-check.patch

--
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux