ipc/util.c, ipc_rcu_alloc: cacheline align allocation
authorManfred Spraul <manfred@colorfullife.com>
Mon, 8 Jul 2013 23:01:20 +0000 (16:01 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 18 Oct 2013 14:45:46 +0000 (07:45 -0700)
commit49f7f31ab27de9bcaf2d12e1d0196400dadf6add
treeb95d01d51e49db3e79e8d49c8b856b54938612eb
parent5cd37e921753eeff777a522aa78b0cc5a6ff7596
ipc/util.c, ipc_rcu_alloc: cacheline align allocation

commit 196aa0132fc7261f34b10ae1bfb44abc1bc69b3c upstream.

Enforce that ipc_rcu_alloc returns a cacheline aligned pointer on SMP.

Rationale:

The SysV sem code tries to move the main spinlock into a seperate
cacheline (____cacheline_aligned_in_smp).  This works only if
ipc_rcu_alloc returns cacheline aligned pointers.  vmalloc and kmalloc
return cacheline algined pointers, the implementation of ipc_rcu_alloc
breaks that.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: Manfred Spraul <manfred@colorfullife.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Davidlohr Bueso <davidlohr.bueso@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Mike Galbraith <efault@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ipc/util.c