From patchwork Fri Oct 1 17:08:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eric Dumazet X-Patchwork-Id: 12531101 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5A00DC4332F for ; Fri, 1 Oct 2021 17:08:22 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id F21AB61B1E for ; Fri, 1 Oct 2021 17:08:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org F21AB61B1E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 4EC0494011A; Fri, 1 Oct 2021 13:08:21 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 49BC99400E4; Fri, 1 Oct 2021 13:08:21 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 389ED94011A; Fri, 1 Oct 2021 13:08:21 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0140.hostedemail.com [216.40.44.140]) by kanga.kvack.org (Postfix) with ESMTP id 28FA49400E4 for ; Fri, 1 Oct 2021 13:08:21 -0400 (EDT) Received: from smtpin40.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id C5A6D8249980 for ; Fri, 1 Oct 2021 17:08:20 +0000 (UTC) X-FDA: 78648501960.40.9444201 Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) by imf27.hostedemail.com (Postfix) with ESMTP id 85CCC7001976 for ; Fri, 1 Oct 2021 17:08:20 +0000 (UTC) Received: by mail-pl1-f172.google.com with SMTP id x4so6718765pln.5 for ; Fri, 01 Oct 2021 10:08:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Y2if6JtpDHx5Au3/IiXuFYQJ5NPAV0CgkFARbb/gA2s=; b=ccIfCNXjf9tNR//mRF8/jbXVyFvoM8fjj9iSsH0ulBu1Dmkyx7lMYbW65TWWMM8AKx sfAgAsCTg+yGW+FKBfEZ0tv3+VKDlidmO2LJq6a0yEHJMqfiaku+kp/BiBA9G+0GyWKd 7gdpmTpRNY3bI3lOLtBIyUE32eoDUINjweb4jFbB334qoKWGqi1GEUEuEq8BKF6fbpmw nulgoMBVKwROFEiG+Awj+c7SpfTp00jTzRl7HKQtk/yhSlQdEvYAv7HbsRL7GwKclTdz o1HBcCjR0Dp0B8GsTWLH8l9TeFgJ6jEH45YxPdk3aiDKeM/RNjdUi5niuEzPKok4pOZP D1Nw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=Y2if6JtpDHx5Au3/IiXuFYQJ5NPAV0CgkFARbb/gA2s=; b=xUFpbO13IZjbnqFi/RooQqmaqYA4ECnGFdJCbBjN90nGItxmbTeFL+nEXef6xhrt95 3DIZOIcoJYnTq9jdr7G8mVOEgqx4yofwa5ysGkAWp/CXjBvOWCuyd6i2LEPEA+CgOUKC VH1QAQvZPvlxCLY9UNHFmcKzs4QQN0+ceJKmbVKATxF/HZZBmoOYHSa+UPHuvKfcIzFP rR3Uv+ef38rPrpF2mRPHcBxkn++6ViC+q5LkjIfoyY+CNdAk53fghknoK6EuQr+RJD+d LYrfnK3O8WHMi343cmeXQpQVlpAiXt29Avkiz/O5udBh5MNnu3qGlQ9rIkHzQabtym0Q 2jWw== X-Gm-Message-State: AOAM531rLIrOPFTu0J8QHQGLkjZ1HWJiWtBB/CnzbHkZusNfdHgi2QeZ HHouZfQXi1yiiGwV8iVLRo0= X-Google-Smtp-Source: ABdhPJxdUQtTzebMw3PF+fxpwBsgkUTmBxnW1T8ZXBGi9KaFaXUtRrAJOpTDSX/BQvS8It3kNMMKkg== X-Received: by 2002:a17:90b:3108:: with SMTP id gc8mr20418141pjb.63.1633108099389; Fri, 01 Oct 2021 10:08:19 -0700 (PDT) Received: from edumazet1.svl.corp.google.com ([2620:15c:2c4:201:b59b:abc0:171:fe0e]) by smtp.gmail.com with ESMTPSA id w185sm4313737pfd.113.2021.10.01.10.08.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 01 Oct 2021 10:08:18 -0700 (PDT) From: Eric Dumazet To: Andrew Morton Cc: linux-kernel , linux-mm , Eric Dumazet , Eric Dumazet , Uladzislau Rezki , Pengfei Li Subject: [PATCH] mm/vmalloc: make sure to dump unpurged areas in /proc/vmallocinfo Date: Fri, 1 Oct 2021 10:08:15 -0700 Message-Id: <20211001170815.73321-1-eric.dumazet@gmail.com> X-Mailer: git-send-email 2.33.0.800.g4c38ced690-goog MIME-Version: 1.0 X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 85CCC7001976 X-Stat-Signature: ooxo7es1wjhqkujwkowgbuzmn35guzmc Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=ccIfCNXj; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf27.hostedemail.com: domain of eric.dumazet@gmail.com designates 209.85.214.172 as permitted sender) smtp.mailfrom=eric.dumazet@gmail.com X-HE-Tag: 1633108100-629283 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: Eric Dumazet If last va found in vmap_area_list does not have a vm pointer, vmallocinfo.s_show() returns 0, and show_purge_info() is not called as it should. Fixes: dd3b8353bae7 ("mm/vmalloc: do not keep unpurged areas in the busy tree") Signed-off-by: Eric Dumazet Cc: Uladzislau Rezki (Sony) Cc: Pengfei Li --- mm/vmalloc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mm/vmalloc.c b/mm/vmalloc.c index d77830ff604cab1796a96e31ad1423a790c61ca7..42219f3d12b567fc64f54cd3e2f1e3398e261a2c 100644 --- a/mm/vmalloc.c +++ b/mm/vmalloc.c @@ -3902,7 +3902,7 @@ static int s_show(struct seq_file *m, void *p) (void *)va->va_start, (void *)va->va_end, va->va_end - va->va_start); - return 0; + goto final; } v = va->vm; @@ -3943,6 +3943,7 @@ static int s_show(struct seq_file *m, void *p) /* * As a final step, dump "unpurged" areas. */ +final: if (list_is_last(&va->list, &vmap_area_list)) show_purge_info(m);