mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
pefile: Fix the failure of calculation for digest
Commite68503bd68forgot to set digest_len and thus cause the following error reported by kexec when launching a crash kernel: kexec_file_load failed: Bad message Fixes:e68503bd68(KEYS: Generalise system_verify_data() to provide access to internal content) Signed-off-by: Lans Zhang <[email protected]> Tested-by: Dave Young <[email protected]> Signed-off-by: David Howells <[email protected]> Cc: Baoquan He <[email protected]> Cc: Vivek Goyal <[email protected]> cc: [email protected] cc: [email protected] Signed-off-by: James Morris <[email protected]>
This commit is contained in:
parent
a46e667887
commit
d128471a14
1 changed files with 6 additions and 1 deletions
|
|
@ -124,5 +124,10 @@ int mscode_note_digest(void *context, size_t hdrlen,
|
|||
struct pefile_context *ctx = context;
|
||||
|
||||
ctx->digest = kmemdup(value, vlen, GFP_KERNEL);
|
||||
return ctx->digest ? 0 : -ENOMEM;
|
||||
if (!ctx->digest)
|
||||
return -ENOMEM;
|
||||
|
||||
ctx->digest_len = vlen;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue