Skip to contentSkip to conversation

kernel-kexec_file-fix-error-return-code-of-kexec_calculate_store_digests.patch removed from -mm tree

merged [email protected] 1 participant 1 message May 8, 2021

lore
Share & tools
lore

[email protected]

author tree notice Applied
#0 lore raw

The patch titled
Subject: kernel: kexec_file: fix error return code of kexec_calculate_store_digests()
has been removed from the -mm tree. Its filename was
kernel-kexec_file-fix-error-return-code-of-kexec_calculate_store_digests.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Jia-Ju Bai <[email protected]>
Subject: 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.

Fixes a43cac0d9dc2 ("kexec: split kexec_file syscall code to kexec_file.c")

---

 kernel/kexec_file.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
kernel/kexec_file.c renamed from kernel/kexec_file.c~kernel-kexec_file-fix-error-return-code-of-kexec_calculate_store_digests +3 -1
@@ -740,8 +740,10 @@ static int kexec_calculate_store_digests
 
 	sha_region_sz = KEXEC_SEGMENT_MAX * sizeof(struct kexec_sha_region);
 	sha_regions = vzalloc(sha_region_sz);
-	if (!sha_regions)
+	if (!sha_regions) {
+		ret = -ENOMEM;
 		goto out_free_desc;
+	}
 
 	desc->tfm   = tfm;
 

_

Patches currently in -mm which might be from [email protected] are