summaryrefslogtreecommitdiff
path: root/mm/slob.c
diff options
context:
space:
mode:
authorGavin Shan <shangw@linux.vnet.ibm.com>2012-05-29 22:06:32 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-29 23:22:21 (GMT)
commit6dccdcbe2c3ebe152847ac8507e7bded4e3f4546 (patch)
tree32d748a8b981e98b64547ab8a7064453b7686334 /mm/slob.c
parent955c1cd7401565671b064e499115344ec8067dfd (diff)
downloadlinux-fsl-qoriq-6dccdcbe2c3ebe152847ac8507e7bded4e3f4546.tar.xz
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 commit 41546c17418f ("bootmem: clean up free_all_bootmem_core") (2.6.27) without known reports. Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com> Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> Acked-by: Tejun Heo <tj@kernel.org> Acked-by: David S. Miller <davem@davemloft.net> Cc: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/slob.c')
0 files changed, 0 insertions, 0 deletions