diff options
author | Kirill A. Shutemov <kirill.shutemov@linux.intel.com> | 2015-11-05 18:44:18 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-11-05 19:34:48 -0800 |
commit | 720abae3d68ae966044497dd9ee5ccf3b16e700c (patch) | |
tree | 064c32bb272fa9914d4f844ce6fc183f1fcabeae /fs/9p/vfs_file.c | |
parent | 262d8a8779e24596ec3452ebb7d0a989de91089a (diff) | |
download | op-kernel-dev-720abae3d68ae966044497dd9ee5ccf3b16e700c.zip op-kernel-dev-720abae3d68ae966044497dd9ee5ccf3b16e700c.tar.gz |
rcu: force alignment on struct callback_head/rcu_head
Make struct callback_head aligned to size of pointer. On most
architectures it happens naturally due ABI requirements, but some
architectures (like CRIS) have weird ABI and we need to ask it explicitly.
The alignment is required to guarantee that bits 0 and 1 of @next will be
clear under normal conditions -- as long as we use call_rcu(),
call_rcu_bh(), call_rcu_sched(), or call_srcu() to queue callback.
This guarantee is important for few reasons:
- future call_rcu_lazy() will make use of lower bits in the pointer;
- the structure shares storage spacer in struct page with @compound_head,
which encode PageTail() in bit 0. The guarantee is needed to avoid
false-positive PageTail().
False postive PageTail() caused crash on crisv32[1]. It happend due
misaligned task_struct->rcu, which was byte-aligned.
[1] http://lkml.kernel.org/r/55FAEA67.9000102@roeck-us.net
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Reported-by: Guenter Roeck <linux@roeck-us.net>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Mikael Starvik <starvik@axis.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/9p/vfs_file.c')
0 files changed, 0 insertions, 0 deletions