33 lines
1.1 KiB
Diff
33 lines
1.1 KiB
Diff
From 9dcf363f509a1fa12a4d0d790a309a77c50aacaa Mon Sep 17 00:00:00 2001
|
|
From: Bhupesh Sharma <bhsharma@redhat.com>
|
|
Date: Mon, 17 Dec 2018 00:46:53 +0530
|
|
Subject: [PATCH 22/37] kexec/kexec-arm64.c: Add error handling check against
|
|
return value of 'set_bootargs()'
|
|
|
|
This patch adds missing error handling check against the return value of
|
|
'set_bootargs()' in 'kexec-arm64.c'
|
|
|
|
Signed-off-by: Bhupesh Sharma <bhsharma@redhat.com>
|
|
Signed-off-by: Simon Horman <horms@verge.net.au>
|
|
---
|
|
kexec/arch/arm64/kexec-arm64.c | 5 +++++
|
|
1 file changed, 5 insertions(+)
|
|
|
|
diff --git a/kexec/arch/arm64/kexec-arm64.c b/kexec/arch/arm64/kexec-arm64.c
|
|
index 8200064..6551b0f 100644
|
|
--- a/kexec/arch/arm64/kexec-arm64.c
|
|
+++ b/kexec/arch/arm64/kexec-arm64.c
|
|
@@ -406,6 +406,11 @@ static int setup_2nd_dtb(struct dtb *dtb, char *command_line, int on_crash)
|
|
}
|
|
|
|
result = set_bootargs(dtb, command_line);
|
|
+ if (result) {
|
|
+ fprintf(stderr, "kexec: cannot set bootargs.\n");
|
|
+ result = -EINVAL;
|
|
+ goto on_error;
|
|
+ }
|
|
|
|
if (on_crash) {
|
|
/* determine #address-cells and #size-cells */
|
|
--
|
|
2.6.4.windows.1
|