Since 3.3 with commit
945aa0ea82 ("MINOR: initcalls: Add a new initcall
stage, STG_INIT_2"), stkt_late_init() calls stkt_create_stk_ctr_pool()
but doesn't check its return value, so if the pool creation fails, the
process still starts, which is not correct. This patch adds a check for
the return value to make sure we fail to start in this case. This was
not an issue before 3.3 because the function was called as a post-check
handler which did check for errors in the returned values.
f = find_sample_fetch("src", strlen("src"));
if (f)
smp_fetch_src = f->process;
- stkt_create_stk_ctr_pool();
+
+ if (stkt_create_stk_ctr_pool() & (ERR_ABORT | ERR_FATAL))
+ exit(1); // error already reported by the function
for (i = 0; i < CONFIG_HAP_TBL_BUCKETS; i++) {
MT_LIST_INIT(&per_bucket[i].toadd_tables);