Skip to content
Commit 4715a811 authored by Stephen Warren's avatar Stephen Warren Committed by Wolfgang Denk
Browse files

disk: part_efi: fix regression due to incorrect buffer usage

Commit deb5ca80

 "disk: part_efi: fix
**pgpt_pte == NULL" modified the code to pass "&gpt_head" to
is_gpt_valid() rather than the previous "gpt_head". However, gpt_head
is a pointer to the buffer, not the actual buffer, since it was allocated
using ALLOC_CACHE_ALIGN_BUFFER. This caused is_gpt_valid() to read the
disk block onto the stack rather than into the buffer, causing the
code to fail.

This change reverts that portion of the commit mentioned above.

Signed-off-by: Stephen Warren's avatarStephen Warren <swarren@nvidia.com>
Acked-by: default avatarDoug Anderson <dianders@chromium.org>
Tested-by: Simon Glass's avatarSimon Glass <sjg@chromium.org>
Acked-by: default avatarMike Frysinger <vapier@gentoo.org>
Tested-by: default avatarAnton Staaf <robotboy@chromium.org>
parent 1cdabc4b
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