From 8faefadb7305b95d02df38bd2ea61429d59483e5 Mon Sep 17 00:00:00 2001 From: Marc Dietrich Date: Fri, 29 Mar 2013 07:57:10 +0000 Subject: disk: fix unaligned access in efi partitions start_sect is not aligned to a 4 byte boundary thus causing exceptions on ARM platforms. Access this field via the get_unaligned_le32 macro. Signed-off-by: Marc Dietrich --- disk/part_efi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'disk') diff --git a/disk/part_efi.c b/disk/part_efi.c index b3fd0e954d..e9987f055c 100644 --- a/disk/part_efi.c +++ b/disk/part_efi.c @@ -30,6 +30,7 @@ * * This limits the maximum size of addressable storage to < 2 Terra Bytes */ +#include #include #include #include @@ -505,7 +506,7 @@ err: static int pmbr_part_valid(struct partition *part) { if (part->sys_ind == EFI_PMBR_OSTYPE_EFI_GPT && - le32_to_cpu(part->start_sect) == 1UL) { + get_unaligned_le32(&part->start_sect) == 1UL) { return 1; } -- cgit v1.2.1