When determining the largest cpudata limit for kmem_cache, the member, limit, of kmem_cache.array[NR_CPUS] is needed, and the process will stop when kmem_cache.array[cpu] equals to NULL. However, when offline cpus exist, kmem_cache.array[cpu] of offline cpus are alse NULL. Then the process of determining the largest cpudata limit will ignore the cpus after the offlined cpu. This patch is used to fix the above problem. Signed-off-by: Qiao Nuohan <qiaonuohan@xxxxxxxxxxxxxx> --- memory.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/memory.c b/memory.c index fbbd01d..6c7f495 100755 --- a/memory.c +++ b/memory.c @@ -9181,7 +9181,13 @@ kmem_cache_s_array_nodes: "array cache array", RETURN_ON_ERROR)) goto bail_out; - for (i = max_limit = 0; (i < kt->cpus) && cpudata[i]; i++) { + for (i = max_limit = 0; i < kt->cpus; i++) { + if (check_offline_cpu(i)) + continue; + + if (!cpudata[i]) + break; + if (!readmem(cpudata[i]+OFFSET(array_cache_limit), KVADDR, &limit, sizeof(int), "array cache limit", RETURN_ON_ERROR)) { -- 1.8.5.3 -- Crash-utility mailing list Crash-utility@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/crash-utility