summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorDavid Miller <davem@davemloft.net>2014-05-05 22:20:04 +0200
committerLinus Torvalds <torvalds@linux-foundation.org>2014-05-06 05:38:49 +0200
commit30321c7b658a5661eea715b33e82a5fd3e33e180 (patch)
treeb317c985e9b3b741ef1c54a420172ea692a297cc /arch
parentslab: fix the type of the index on freelist index accessor (diff)
downloadlinux-30321c7b658a5661eea715b33e82a5fd3e33e180.tar.xz
linux-30321c7b658a5661eea715b33e82a5fd3e33e180.zip
slab: Fix off by one in object max number tests.
If freelist_idx_t is a byte, SLAB_OBJ_MAX_NUM should be 255 not 256, and likewise if freelist_idx_t is a short, then it should be 65535 not 65536. This was leading to all kinds of random crashes on sparc64 where PAGE_SIZE is 8192. One problem shown was that if spinlock debugging was enabled, we'd get deadlocks in copy_pte_range() or do_wp_page() with the same cpu already holding a lock it shouldn't hold, or the lock belonging to a completely unrelated process. Fixes: a41adfaa23df ("slab: introduce byte sized index for the freelist of a slab") Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch')
0 files changed, 0 insertions, 0 deletions