aboutsummaryrefslogtreecommitdiff
path: root/arch/sparc/include/asm/parport.h
diff options
context:
space:
mode:
authorCarsten Otte <cotte@de.ibm.com>2010-08-06 18:19:22 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2010-08-26 16:45:57 -0700
commit5ef5852385892aa4d9331b5bc20962b87c91d562 (patch)
treea8328cbf77b8b16287898aa905886c66c38b9332 /arch/sparc/include/asm/parport.h
parent1f0a86afdf7fc4782c6d3bbd30f21cbce9b5b6f9 (diff)
downloadlinux-linaro-5ef5852385892aa4d9331b5bc20962b87c91d562.tar.gz
slab: fix object alignment
commit 1ab335d8f85792e3b107ff8237d53cf64db714df upstream. This patch fixes alignment of slab objects in case CONFIG_DEBUG_PAGEALLOC is active. Before this spot in kmem_cache_create, we have this situation: - align contains the required alignment of the object - cachep->obj_offset is 0 or equals align in case of CONFIG_DEBUG_SLAB - size equals the size of the object, or object plus trailing redzone in case of CONFIG_DEBUG_SLAB This spot tries to fill one page per object if the object is in certain size limits, however setting obj_offset to PAGE_SIZE - size does break the object alignment since size may not be aligned with the required alignment. This patch simply adds an ALIGN(size, align) to the equation and fixes the object size detection accordingly. This code in drivers/s390/cio/qdio_setup_init has lead to incorrectly aligned slab objects (sizeof(struct qdio_q) equals 1792): qdio_q_cache = kmem_cache_create("qdio_q", sizeof(struct qdio_q), 256, 0, NULL); Acked-by: Christoph Lameter <cl@linux.com> Signed-off-by: Carsten Otte <cotte@de.ibm.com> Signed-off-by: Pekka Enberg <penberg@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'arch/sparc/include/asm/parport.h')
0 files changed, 0 insertions, 0 deletions