From patchwork Wed Oct 19 03:18:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hugh Dickins X-Patchwork-Id: 13011320 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 kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3E670C4332F for ; Wed, 19 Oct 2022 03:18:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 479DE6B0072; Tue, 18 Oct 2022 23:18:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 42A206B0073; Tue, 18 Oct 2022 23:18:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2F14B6B0074; Tue, 18 Oct 2022 23:18:52 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 1FE1F6B0072 for ; Tue, 18 Oct 2022 23:18:52 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id E6FFA1604B5 for ; Wed, 19 Oct 2022 03:18:51 +0000 (UTC) X-FDA: 80036242062.29.D259578 Received: from mail-oa1-f48.google.com (mail-oa1-f48.google.com [209.85.160.48]) by imf19.hostedemail.com (Postfix) with ESMTP id A04A11A0005 for ; Wed, 19 Oct 2022 03:18:51 +0000 (UTC) Received: by mail-oa1-f48.google.com with SMTP id 586e51a60fabf-1322fa1cf6fso19170768fac.6 for ; Tue, 18 Oct 2022 20:18:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=mime-version:message-id:subject:cc:to:from:date:from:to:cc:subject :date:message-id:reply-to; bh=GAeyZnwzzfhGFESECQVoU1J4Mcn3Vns5Z1CRpRFhKJ0=; b=K33RaYRgNppDWt/10xzhwd1v4B26clXQn+9iNAMke6fpUUlY+ZvG3M7UC9+DN5ZlMN zBoltdhn9vtmhEj1dWpB6mpxm2ExFrfqcH/0BHF4Yr/69k/Pp11/7iJmvbbwHvAId5cC RZ8PAN4fWaorWkQHvNJFZi5E8lr1HVCpFyp2yPiF4ZY1RsDGlBhpu38Foor+F+GaOpii izUeSQbPHKsKUW6zAQbAm06q2ZcINLwY+Rqc3EeIlzfdtgTDzhkFNsTt2ML/RWZODdfI +OCDuso4CR3Z2o1VoOOzQnHO3pyrfXz1+XQ75mTALt2W+1tA5NFpA8fih1YTfXXdxO3M okyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:message-id:subject:cc:to:from:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=GAeyZnwzzfhGFESECQVoU1J4Mcn3Vns5Z1CRpRFhKJ0=; b=A00eOrdM7sEfjw0MVRNeeEpIjTqJfZNR4dQMCg06wwr6yy5v3N9nFg0aPOKcpi9qDZ QuRwEYI6m9DC6gqc57BbmMxObEwPpyWo60Lt0U4yZUQZ65ROCRyaGEM4Hn4ZpYBcEGqG qKDwci9J3FlqUdfIsUL9ANAuJF6wRdDFY8nXy04cDeqtX8w0UhB5crk84KKTP33vS3hu 2rMSmQsl9cIt7J+K+PDNF2v6u3Z1dmnpQ3Ng7WF2vis+t5dh/N28pwg3aj6gvHE0LuW4 leQ8YijmyGf+TPRPq1qSq1lNMMUcJs5u1WsZmp2fbP26q1F3VokX0DhY6X2uB6sQzctE O5NA== X-Gm-Message-State: ACrzQf0grkQqiMnmD1gS8u07hr7W5M9TX104EfWaDFaCeMZYhwr4jJsn +OSF2/IQZDPpQXxFReu0A1nowQ== X-Google-Smtp-Source: AMsMyM7OMl9zIUyR6LciyHrft8KITcPb5cfldifc8PFJicTj4YSK5oMyxRs0eC5+B+Rb5hQAFPGsRA== X-Received: by 2002:a05:6870:a553:b0:11e:5231:4eec with SMTP id p19-20020a056870a55300b0011e52314eecmr3613843oal.143.1666149529319; Tue, 18 Oct 2022 20:18:49 -0700 (PDT) Received: from ripple.attlocal.net (172-10-233-147.lightspeed.sntcca.sbcglobal.net. [172.10.233.147]) by smtp.gmail.com with ESMTPSA id w192-20020acaadc9000000b00353f41440dasm6184323oie.56.2022.10.18.20.18.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Oct 2022 20:18:49 -0700 (PDT) Date: Tue, 18 Oct 2022 20:18:38 -0700 (PDT) From: Hugh Dickins X-X-Sender: hugh@ripple.attlocal.net To: Andrew Morton cc: Matthew Wilcox , "Liam R. Howlett" , Alexey Dobriyan , Seth Jenkins , Vlastimil Babka , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH] mm: /proc/pid/smaps_rollup: fix maple tree search Message-ID: <3011bee7-182-97a2-1083-d5f5b688e54b@google.com> MIME-Version: 1.0 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1666149531; a=rsa-sha256; cv=none; b=s1TLdrbX7HclQgtSWL7sZf/Tz/zLE3vf8LrBmJqors9HP5bAS7AosgOElgj5c4vAmVnu1Y iVi2nJVd3WusTDGtwvVvVjDHUcXRhN+M6rYOvqSCOVO+lsXoY/wLQS8kvhOzU0PCdZd/eH 0BF70hD8L0GAyZ/mJjrxAacaQJ5969M= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=K33RaYRg; spf=pass (imf19.hostedemail.com: domain of hughd@google.com designates 209.85.160.48 as permitted sender) smtp.mailfrom=hughd@google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1666149531; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding:in-reply-to: references:dkim-signature; bh=GAeyZnwzzfhGFESECQVoU1J4Mcn3Vns5Z1CRpRFhKJ0=; b=YhbXPTxt/3Wy3+zuVHC4N4Wu1lzpsfQGw+wwXGtZlG29kTS1Uw071/H/S5mHoCJnxiooOM /hMJUbCR0JFK5VrWUmNME1+gAUwLJC9Mc07svfRNjU+DCh+LnB198yfCk6dT2jUzRDCA1D GwAnAPZuDUJ7cZx6pkhsG5D7VsGLgMI= X-Stat-Signature: ozho3neaocyz4b3hsiimuidcsc6ugs79 X-Rspamd-Queue-Id: A04A11A0005 X-Rspam-User: X-Rspamd-Server: rspam03 Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b=K33RaYRg; spf=pass (imf19.hostedemail.com: domain of hughd@google.com designates 209.85.160.48 as permitted sender) smtp.mailfrom=hughd@google.com; dmarc=pass (policy=reject) header.from=google.com X-HE-Tag: 1666149531-545525 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: /proc/pid/smaps_rollup showed 0 kB for everything: now find first vma. Fixes: c4c84f06285e ("fs/proc/task_mmu: stop using linked list and highest_vm_end") Signed-off-by: Hugh Dickins Reviewed-by: Liam R. Howlett --- fs/proc/task_mmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- 6.1-rc1/fs/proc/task_mmu.c +++ linux/fs/proc/task_mmu.c @@ -902,7 +902,7 @@ static int show_smaps_rollup(struct seq_ goto out_put_mm; hold_task_mempolicy(priv); - vma = mas_find(&mas, 0); + vma = mas_find(&mas, ULONG_MAX); if (unlikely(!vma)) goto empty_set;