summaryrefslogtreecommitdiff
path: root/kexec
diff options
context:
space:
mode:
authorDaniel Mack <zonque@gmail.com>2012-11-26 13:14:43 +0100
committerSimon Horman <horms@verge.net.au>2012-11-27 11:29:54 +0900
commit5796e76fb629738b0e9672f69745f2e7017ec257 (patch)
tree4d307b1a9db5c2453d83ed3315ed0eb08da34bd8 /kexec
parent7cda3bf134bfdd64e6e8219516129efa70e1fdd4 (diff)
fs2dt: check for initrd_size != 0 when adding initrd entries
This prevents the creation of chosen/linux,initrd-{start,stop} entries with zero length. Signed-off-by: Daniel Mack <zonque@gmail.com> Signed-off-by: Simon Horman <horms@verge.net.au>
Diffstat (limited to 'kexec')
-rw-r--r--kexec/fs2dt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kexec/fs2dt.c b/kexec/fs2dt.c
index 79258a1..5d933c8 100644
--- a/kexec/fs2dt.c
+++ b/kexec/fs2dt.c
@@ -525,7 +525,7 @@ static void putnode(void)
putprops(dn, namelist, numlist);
/* Add initrd entries to the second kernel */
- if (initrd_base && !strcmp(basename,"chosen/")) {
+ if (initrd_base && initrd_size && !strcmp(basename,"chosen/")) {
int len = 8;
unsigned long long initrd_end;