New pollers did not have a corresponding run_counter_history entry when displaying data for the first time after they were created. If user enabled g_interval_data and observed the creation of the poller, application crashed due to get_last_run_counter() returning NULL pointer. Fixes #1995 For new pollers there is no historical data and current last_run_counter, matches the expected last_run_counter for displayed spdk_top interval. get_last_run_counter() now returns 0 when matching run_counter_history is missing. Avoiding dereference of a NULL pointer. While here modified copy_pollers() to no longer get and store the last run counter twice. When doing reset_last_counter only storing the new last run counter is needed. Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com> Change-Id: I5218c9ac0f2f79da32840cf64b4083642893f5cc Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/8683 Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com> Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com> |
||
---|---|---|
.. | ||
iscsi_tgt | ||
iscsi_top | ||
nvmf_tgt | ||
spdk_dd | ||
spdk_lspci | ||
spdk_tgt | ||
spdk_top | ||
trace | ||
trace_record | ||
vhost | ||
Makefile |