Skip to content
Commit 8447c4d1 authored by Chris Metcalf's avatar Chris Metcalf Committed by Mauro Carvalho Chehab
Browse files

edac: Do alignment logic properly in edac_align_ptr()



The logic was checking the sizeof the structure being allocated to
determine whether an alignment fixup was required.  This isn't right;
what we actually care about is the alignment of the actual pointer that's
about to be returned.  This became an issue recently because struct
edac_mc_layer has a size that is not zero modulo eight, so we were
taking the correctly-aligned pointer and forcing it to be misaligned.
On Tile this caused an alignment exception.

Signed-off-by: default avatarChris Metcalf <cmetcalf@tilera.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent b9bc5ddb
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment