[3/9] fast-reboot: add missing clear memory fallback
diff mbox series

Message ID 20200226183408.1626737-4-npiggin@gmail.com
State New
Headers show
Series
  • assorted fixes and preparation
Related show

Checks

Context Check Description
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot-dco success Signed-off-by present
snowpatch_ozlabs/snowpatch_job_snowpatch-skiboot success Test snowpatch/job/snowpatch-skiboot on branch master
snowpatch_ozlabs/apply_patch success Successfully applied on branch master (f123417068e51842004bdc047c8c5107b70442ef)

Commit Message

Nicholas Piggin Feb. 26, 2020, 6:34 p.m. UTC
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
 core/mem_region.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

Patch
diff mbox series

diff --git a/core/mem_region.c b/core/mem_region.c
index eb48a1a11..8eda30598 100644
--- a/core/mem_region.c
+++ b/core/mem_region.c
@@ -1365,8 +1365,14 @@  void start_mem_region_clear_unused(void)
 		free(path);
 		jobs[i] = cpu_queue_job_on_node(chip_id,
 						job_args[i].job_name,
-					mem_region_clear_job,
-					&job_args[i]);
+						mem_region_clear_job,
+						&job_args[i]);
+		if (!jobs[i])
+			jobs[i] = cpu_queue_job(NULL,
+						job_args[i].job_name,
+						mem_region_clear_job,
+						&job_args[i]);
+		assert(jobs[i]);
 		i++;
 	}
 	unlock(&mem_region_lock);