[coreboot-gerrit] Change in coreboot[master]: fit: Handle decompression errors properly
Patrick Rudolph (Code Review)
gerrit at coreboot.org
Thu Aug 9 09:10:31 CEST 2018
Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/27970
Change subject: fit: Handle decompression errors properly
......................................................................
fit: Handle decompression errors properly
Set payload to NULL in case of decompression errors.
Fixes booting a kernel that could be decompressed.
Change-Id: I3a602b0e90923a0b5a3683c4a0adf9e4733d5a2a
Signed-off-by: Patrick Rudolph <patrick.rudolph at 9elements.com>
---
M src/lib/fit_payload.c
1 file changed, 2 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/70/27970/1
diff --git a/src/lib/fit_payload.c b/src/lib/fit_payload.c
index ada22e8..9dbd878 100644
--- a/src/lib/fit_payload.c
+++ b/src/lib/fit_payload.c
@@ -163,6 +163,7 @@
if (config->ramdisk_node &&
extract(&initrd, config->ramdisk_node)) {
printk(BIOS_ERR, "ERROR: Failed to extract initrd\n");
+ prog_set_entry(payload, NULL, NULL);
rdev_munmap(prog_rdev(payload), data);
return;
}
@@ -171,6 +172,7 @@
if (extract(&kernel, config->kernel_node)) {
printk(BIOS_ERR, "ERROR: Failed to extract kernel\n");
+ prog_set_entry(payload, NULL, NULL);
rdev_munmap(prog_rdev(payload), data);
return;
}
--
To view, visit https://review.coreboot.org/27970
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I3a602b0e90923a0b5a3683c4a0adf9e4733d5a2a
Gerrit-Change-Number: 27970
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Rudolph <patrick.rudolph at 9elements.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180809/8c181da3/attachment-0001.html>
More information about the coreboot-gerrit
mailing list