Skip to content
Commit 31d82c2c authored by Jia-Ju Bai's avatar Jia-Ju Bai Committed by Linus Torvalds
Browse files

kernel: kexec_file: fix error return code of kexec_calculate_store_digests()

When vzalloc() returns NULL to sha_regions, no error return code of
kexec_calculate_store_digests() is assigned.  To fix this bug, ret is
assigned with -ENOMEM in this case.

Link: https://lkml.kernel.org/r/20210309083904.24321-1-baijiaju1990@gmail.com
Fixes: a43cac0d

 ("kexec: split kexec_file syscall code to kexec_file.c")
Signed-off-by: default avatarJia-Ju Bai <baijiaju1990@gmail.com>
Reported-by: default avatarTOTE Robot <oslab@tsinghua.edu.cn>
Acked-by: default avatarBaoquan He <bhe@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent a119b4e5
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