aboutsummaryrefslogtreecommitdiffstats
path: root/fs/partitions/efi.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-05-20 20:06:24 +0200
committerThomas Gleixner <tglx@linutronix.de>2011-05-20 20:08:05 +0200
commit250f972d85effad5b6e10da4bbd877e6a4b503b6 (patch)
tree007393a6fc6439af7e0121dd99a6f9f9fb8405bc /fs/partitions/efi.c
parentclockevents: Move C3 stop test outside lock (diff)
parentMAINTAINERS: Add drivers/clocksource to TIMEKEEPING (diff)
downloadlinux-dev-250f972d85effad5b6e10da4bbd877e6a4b503b6.tar.xz
linux-dev-250f972d85effad5b6e10da4bbd877e6a4b503b6.zip
Merge branch 'timers/urgent' into timers/core
Reason: Get upstream fixes and kfree_rcu which is necessary for a follow up patch. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'fs/partitions/efi.c')
-rw-r--r--fs/partitions/efi.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/partitions/efi.c b/fs/partitions/efi.c
index ac0ccb5026a2..19d6750d1d6c 100644
--- a/fs/partitions/efi.c
+++ b/fs/partitions/efi.c
@@ -348,6 +348,12 @@ static int is_gpt_valid(struct parsed_partitions *state, u64 lba,
goto fail;
}
+ /* Check that sizeof_partition_entry has the correct value */
+ if (le32_to_cpu((*gpt)->sizeof_partition_entry) != sizeof(gpt_entry)) {
+ pr_debug("GUID Partitition Entry Size check failed.\n");
+ goto fail;
+ }
+
if (!(*ptes = alloc_read_gpt_entries(state, *gpt)))
goto fail;