Update to 2.6.32.41 Mainline
/fs/partitions/efi.c
blob:49cfd5f5423894df4c2f52ac48bac1f82a9b43a3 -> blob:2aac7764b7e5146bbac9ea5dadc23c029ae4dd78
--- fs/partitions/efi.c
+++ fs/partitions/efi.c
@@ -349,6 +349,12 @@ is_gpt_valid(struct block_device *bdev,
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(bdev, *gpt)))
goto fail;