]> git.baikalelectronics.ru Git - kernel.git/commit
[POWERPC] Fix alignment problem in rh_alloc_align() with exact-sized blocks
authorTimur Tabi <timur@freescale.com>
Mon, 14 May 2007 16:31:26 +0000 (11:31 -0500)
committerPaul Mackerras <paulus@samba.org>
Thu, 17 May 2007 11:10:16 +0000 (21:10 +1000)
commite216bbee104a94a033bb1b1d4deb551d22da0ed1
tree8353c7c550fcecea589d6c5c0fbee4ad35af7a78
parent1bb1e511923dca2742764ec47ab955e831660843
[POWERPC] Fix alignment problem in rh_alloc_align() with exact-sized blocks

When an rheap is created, the caller can specify the alignment to use.  In
rh_alloc_align(), if a free block is found that is the exact size needed
(including extra space for alignment), that configured alignment value is not
used to align the pointer.  Instead, the default alignment is used.  If the
default alignment is smaller than the configured alignment, then the returned
value will not be aligned correctly.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
arch/powerpc/lib/rheap.c