aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJohannes Weiner <hannes@saeurebad.de>2008-08-20 14:09:15 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-08-20 15:40:31 -0700
commit481ebd0d76b501c5772f702ae31e55350c0858a3 (patch)
tree37f13727a66bf2cb10e4d8be7a608edf9cd5009e /fs
parenta09f48551273ee89d4e9ae37474807dc2da1d757 (diff)
downloadkernel_samsung_smdk4412-481ebd0d76b501c5772f702ae31e55350c0858a3.zip
kernel_samsung_smdk4412-481ebd0d76b501c5772f702ae31e55350c0858a3.tar.gz
kernel_samsung_smdk4412-481ebd0d76b501c5772f702ae31e55350c0858a3.tar.bz2
bootmem: fix aligning of node-relative indexes and offsets
Absolute alignment requirements may never be applied to node-relative offsets. Andreas Herrmann spotted this flaw when a bootmem allocation on an unaligned node was itself not aligned because the combination of an unaligned node with an aligned offset into that node is not garuanteed to be aligned itself. This patch introduces two helper functions that align a node-relative index or offset with respect to the node's starting address so that the absolute PFN or virtual address that results from combining the two satisfies the requested alignment. Then all the broken ALIGN()s in alloc_bootmem_core() are replaced by these helpers. Signed-off-by: Johannes Weiner <hannes@saeurebad.de> Reported-by: Andreas Herrmann <andreas.herrmann3@amd.com> Debugged-by: Andreas Herrmann <andreas.herrmann3@amd.com> Reviewed-by: Andreas Herrmann <andreas.herrmann3@amd.com> Tested-by: Andreas Herrmann <andreas.herrmann3@amd.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
0 files changed, 0 insertions, 0 deletions