From patchwork Wed Mar 6 12:32:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oscar Salvador X-Patchwork-Id: 13583998 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 CB170C5475B for ; Wed, 6 Mar 2024 12:31:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5B2446B0078; Wed, 6 Mar 2024 07:31:13 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5895F6B007D; Wed, 6 Mar 2024 07:31:13 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4076F6B007E; Wed, 6 Mar 2024 07:31:13 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 2D6156B0078 for ; Wed, 6 Mar 2024 07:31:13 -0500 (EST) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 04D5440BEF for ; Wed, 6 Mar 2024 12:31:12 +0000 (UTC) X-FDA: 81866549226.06.60AD17E Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by imf06.hostedemail.com (Postfix) with ESMTP id D545D18000A for ; Wed, 6 Mar 2024 12:31:09 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=GeEEvH7o; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=byNP0X5z; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=GeEEvH7o; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=byNP0X5z; spf=pass (imf06.hostedemail.com: domain of osalvador@suse.de designates 195.135.223.131 as permitted sender) smtp.mailfrom=osalvador@suse.de; dmarc=pass (policy=none) header.from=suse.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1709728270; 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-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=rBlJtVja81KFeI8Jp6o410PFrC90a2K0vJckbpWhMBc=; b=VeM87q2EpKxyoOkk1RsrLSWoIRDvKw9C8O5K0+x6eDLEl/D896ErQF2hMVsqZIfScY5VNq rtY8LS6DBU4KpxI8af6UOGV19MBgg1niCpokCzzUGFhzNJPQACLIFEd3D9HXrWXC+V7BXA dp9HsKVOjrpD1QcrfjHh/Pkg+gSdvnk= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=GeEEvH7o; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=byNP0X5z; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=GeEEvH7o; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=byNP0X5z; spf=pass (imf06.hostedemail.com: domain of osalvador@suse.de designates 195.135.223.131 as permitted sender) smtp.mailfrom=osalvador@suse.de; dmarc=pass (policy=none) header.from=suse.de ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1709728270; a=rsa-sha256; cv=none; b=b2oBpfVPHHZbjR+KTGbwpzlqGp0msm8sFbOF7AVoz9JeF4YnyswfUUVelx9ERpWvUTLjEO quucSnPb5jRO5WQeIfxeOLCGMdQWVvtMe3k6JClKNBLmx0V8HORdp0BuD9Xr4Dwc/FvvpP 7pxQYZmg3iLSzqEk1bvvpfMCsd9KUuE= Received: from imap2.dmz-prg2.suse.org (imap2.dmz-prg2.suse.org [10.150.64.98]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 34DD7759A5; Wed, 6 Mar 2024 12:31:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1709728268; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rBlJtVja81KFeI8Jp6o410PFrC90a2K0vJckbpWhMBc=; b=GeEEvH7oKsaX6wN4AhpJKQ+b+OL817lZzSZEp8PpiEfVk2AyHlRcWIZ6nzYzy94FmbjdWB 22LQWNk+j7Rp3cZQSiqoaG7Ox2oEe6/GUdiATcLPr715wlWLkbHwkf4a8/2lmPw39hBhEN wMpw4TCBkafldEp3gXZMM6MAJvW074Q= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1709728268; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rBlJtVja81KFeI8Jp6o410PFrC90a2K0vJckbpWhMBc=; b=byNP0X5z1ajkB68ZoOPJL5oehbqo35x5Oo4zLvow9uSs5KH9AuBSFzcsSu6i+WcQSPlpl/ Q7doAaJd3ptnLzDQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1709728268; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rBlJtVja81KFeI8Jp6o410PFrC90a2K0vJckbpWhMBc=; b=GeEEvH7oKsaX6wN4AhpJKQ+b+OL817lZzSZEp8PpiEfVk2AyHlRcWIZ6nzYzy94FmbjdWB 22LQWNk+j7Rp3cZQSiqoaG7Ox2oEe6/GUdiATcLPr715wlWLkbHwkf4a8/2lmPw39hBhEN wMpw4TCBkafldEp3gXZMM6MAJvW074Q= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1709728268; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rBlJtVja81KFeI8Jp6o410PFrC90a2K0vJckbpWhMBc=; b=byNP0X5z1ajkB68ZoOPJL5oehbqo35x5Oo4zLvow9uSs5KH9AuBSFzcsSu6i+WcQSPlpl/ Q7doAaJd3ptnLzDQ== Received: from imap2.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap2.dmz-prg2.suse.org (Postfix) with ESMTPS id 9A03F1377D; Wed, 6 Mar 2024 12:31:07 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap2.dmz-prg2.suse.org with ESMTPSA id CJLKIgti6GUaTwAAn2gu4w (envelope-from ); Wed, 06 Mar 2024 12:31:07 +0000 From: Oscar Salvador To: Andrew Morton Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Michal Hocko , Vlastimil Babka , Marco Elver , Andrey Konovalov , Alexander Potapenko , Oscar Salvador , kernel test robot Subject: [PATCH 1/2] mm,page_owner: Check for null stack_record before bumping its refcount Date: Wed, 6 Mar 2024 13:32:16 +0100 Message-ID: <20240306123217.29774-2-osalvador@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240306123217.29774-1-osalvador@suse.de> References: <20240306123217.29774-1-osalvador@suse.de> MIME-Version: 1.0 X-Rspamd-Queue-Id: D545D18000A X-Rspam-User: X-Stat-Signature: 7k4toazbtmudxxb86ztbqcaz5agd8ocn X-Rspamd-Server: rspam01 X-HE-Tag: 1709728269-847063 X-HE-Meta: U2FsdGVkX1+XWJLKmzcPdHawiQqqH+bYHLP7K7V5gqFge/u3hKujCRp58qxqgrLZfprETlixPfUdlgYv+Lwpk62U6o1ms4GMW2pzJgLsgzXkz4WAN2DRYAe6r1ZXIRKFY/GLCaof8k62v4vr0xrXXsJunZaDYSmAR7pWCepDAubv0LY8pVT53wzB7pB2K5vuynfqResp1dHkSBZRl7erhRStNUTT40v185zZW/r2ET49Qr+6sfiGSMdevcWuUCAMQWusONjBpNPwke8vBA1Jrik7wDDYxG9Y+ZeCWi/LyUxsCdatgNDXChKxRaw9oUinbOmiCsv/UVUc0xftz5YQAJV3OFigTblWZDsR6U89zjalMKmkBnmr3MMaGNsBg0+slsbT0V7/HErGUPxzRea1csH+yVleIqhVLI4ywdrThs+zKmtzckijeVrrMUDVbUYVkhczt+wNknwmEvgJhDeGk8ygMFr/lb6juUsSxkl0ERA2YPjNTdwM4jJaxMa+nEHHe633WrJLGVns8NvtnICdBepqaRwlakJ0JKeNPIBv5SdQmjab8aellFxqX9wQ7zcClrI67G1m7CXAvNrXEJvNV3w4qzTihoqLmjIpoACRByo4Ownrx20r/Uq5pxMTG/IdFytig3Nz+RB3a7sDJF67RnsfSijZGjl4ewrBHHCu/UE6Hqg4KGqBcmx3wDBePQ9Nqc3HGpFTodhiB7A314OIUx9wGOZq8UtwGQRAt0sr+Vi7BxAl8A6a2G+oiqCSDEcrIQCqC0H/h/5KBEJU8f6mhiOf0cidYd+m4uL3+pg6qxxGIZi2FZjOjXfnWKzxiApr1MelCZFoXN753SwKCOb14eRsuMa/OcoDzF54cItsdJuLEzt4rx5MfdcDKszpsS6hGS+qlVbqRjCgwCGWOpA2PaOOFX3RHYQ+Gdf1F9Ok/cb8LnFkU13D2sFW/2IejyFUnNcKVDojdQMQ8KzRSQT np0cEaG3 tHj72gy2GLKagaPzrIXdU191qa6CdjHHjy5dk 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: List-Subscribe: List-Unsubscribe: Although the retrieval of the stack_records for {dummy,failure}_handle happen when page_owner gets initialized, there seems to be some situations where stackdepot space has been already depleted by then, so we get 0-handles which make stack_records being NULL for those cases. Be careful to 1) only bump stack_records refcount and 2) only access stack_record fields if we actually have a non-null stack_record between hands. Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-lkp/202403051032.e2f865a-lkp@intel.com Fixes: 4bedfb314bdd ("mm,page_owner: implement the tracking of the stacks count") Signed-off-by: Oscar Salvador Reviewed-by: Vlastimil Babka --- mm/page_owner.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/mm/page_owner.c b/mm/page_owner.c index 033e349f6479..7163a1c44ccf 100644 --- a/mm/page_owner.c +++ b/mm/page_owner.c @@ -107,8 +107,10 @@ static __init void init_page_owner(void) /* Initialize dummy and failure stacks and link them to stack_list */ dummy_stack.stack_record = __stack_depot_get_stack_record(dummy_handle); failure_stack.stack_record = __stack_depot_get_stack_record(failure_handle); - refcount_set(&dummy_stack.stack_record->count, 1); - refcount_set(&failure_stack.stack_record->count, 1); + if (dummy_stack.stack_record) + refcount_set(&dummy_stack.stack_record->count, 1); + if (failure_stack.stack_record) + refcount_set(&failure_stack.stack_record->count, 1); dummy_stack.next = &failure_stack; stack_list = &dummy_stack; } @@ -856,6 +858,9 @@ static int stack_print(struct seq_file *m, void *v) unsigned long nr_entries; struct stack_record *stack_record = stack->stack_record; + if (!stack->stack_record) + return 0; + nr_entries = stack_record->size; entries = stack_record->entries; stack_count = refcount_read(&stack_record->count) - 1; From patchwork Wed Mar 6 12:32:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oscar Salvador X-Patchwork-Id: 13583999 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 7C11AC54E41 for ; Wed, 6 Mar 2024 12:31:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BF4406B007D; Wed, 6 Mar 2024 07:31:13 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id BA4156B007E; Wed, 6 Mar 2024 07:31:13 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9CED66B0080; Wed, 6 Mar 2024 07:31:13 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 8D9906B007D for ; Wed, 6 Mar 2024 07:31:13 -0500 (EST) Received: from smtpin08.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 6A998160E94 for ; Wed, 6 Mar 2024 12:31:13 +0000 (UTC) X-FDA: 81866549226.08.FD8CD1D Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) by imf02.hostedemail.com (Postfix) with ESMTP id 2779C80002 for ; Wed, 6 Mar 2024 12:31:10 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=zkKuuijP; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=Yol0huDH; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=zkKuuijP; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=Yol0huDH; dmarc=pass (policy=none) header.from=suse.de; spf=pass (imf02.hostedemail.com: domain of osalvador@suse.de designates 195.135.223.131 as permitted sender) smtp.mailfrom=osalvador@suse.de ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1709728271; 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-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=OMF4QDA/BIIwL+kdUSy1E5oYvYlaroCGSWt9+J3am6I=; b=NhQGtuDGpsfF89qgwqbqTKtTQXRPfERypU6dTYMhhGPuEGvn0RO5oEOe1GxFcvgIFG9Tff +wJIyvNY3rppka5Tcb3oM806/dbgDRDFvWjKnXUbTPJPwzpvtFX0pgAG4wTvoMSLurfbgJ c/nQRiF9Ehqscf9fm2ZC7PA/uTYv0sA= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=zkKuuijP; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=Yol0huDH; dkim=pass header.d=suse.de header.s=susede2_rsa header.b=zkKuuijP; dkim=pass header.d=suse.de header.s=susede2_ed25519 header.b=Yol0huDH; dmarc=pass (policy=none) header.from=suse.de; spf=pass (imf02.hostedemail.com: domain of osalvador@suse.de designates 195.135.223.131 as permitted sender) smtp.mailfrom=osalvador@suse.de ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1709728271; a=rsa-sha256; cv=none; b=PWCjmtR0l0etAMpKA9hd2RLjJu2vVxpg0pm8pVjZaVrmBpD1OBuShBP9MVplK3YiiCeLyu MVVUkw6sdS8xJrM1vitGuW6W9mWO1JcuOkV/xESpayJv/ZEE3bpNAORJ1YsbhZIQdIHxCM 516FZxOFXSBiFZHdBSUqg0Lt1GXcxG4= Received: from imap2.dmz-prg2.suse.org (imap2.dmz-prg2.suse.org [10.150.64.98]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id BF4A0759C3; Wed, 6 Mar 2024 12:31:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1709728269; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OMF4QDA/BIIwL+kdUSy1E5oYvYlaroCGSWt9+J3am6I=; b=zkKuuijPtkX3+HRHmbSvRGQBMjgF+6ket/HA3Smww4iLnhtgAZlQQfuL/JJ/dWrE+xXjRu QCZAg7b1kMx1Yu/WNaMSka4dNR7vLJhPP7jtJ1jzpP1pcoJOxXo4aj5rUxN0j8UEJG/KuC K7tJ6dXo3m5zI7bzctnDO4tUtU5CxWo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1709728269; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OMF4QDA/BIIwL+kdUSy1E5oYvYlaroCGSWt9+J3am6I=; b=Yol0huDHb0VY+oMPN3hvChYMwd7AcGe8W7vBXgQ6s67q9g2lDhCyf5oZTlfcoho+IhYlmX LW/dNK8fE0YGPuDA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1709728269; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OMF4QDA/BIIwL+kdUSy1E5oYvYlaroCGSWt9+J3am6I=; b=zkKuuijPtkX3+HRHmbSvRGQBMjgF+6ket/HA3Smww4iLnhtgAZlQQfuL/JJ/dWrE+xXjRu QCZAg7b1kMx1Yu/WNaMSka4dNR7vLJhPP7jtJ1jzpP1pcoJOxXo4aj5rUxN0j8UEJG/KuC K7tJ6dXo3m5zI7bzctnDO4tUtU5CxWo= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1709728269; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OMF4QDA/BIIwL+kdUSy1E5oYvYlaroCGSWt9+J3am6I=; b=Yol0huDHb0VY+oMPN3hvChYMwd7AcGe8W7vBXgQ6s67q9g2lDhCyf5oZTlfcoho+IhYlmX LW/dNK8fE0YGPuDA== Received: from imap2.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap2.dmz-prg2.suse.org (Postfix) with ESMTPS id 302E71377D; Wed, 6 Mar 2024 12:31:09 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap2.dmz-prg2.suse.org with ESMTPSA id AJEaCQ1i6GUaTwAAn2gu4w (envelope-from ); Wed, 06 Mar 2024 12:31:09 +0000 From: Oscar Salvador To: Andrew Morton Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, Michal Hocko , Vlastimil Babka , Marco Elver , Andrey Konovalov , Alexander Potapenko , Oscar Salvador Subject: [PATCH 2/2] mm,page_owner: Drop unnecesary check Date: Wed, 6 Mar 2024 13:32:17 +0100 Message-ID: <20240306123217.29774-3-osalvador@suse.de> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240306123217.29774-1-osalvador@suse.de> References: <20240306123217.29774-1-osalvador@suse.de> MIME-Version: 1.0 X-Rspamd-Queue-Id: 2779C80002 X-Rspam-User: X-Rspamd-Server: rspam04 X-Stat-Signature: bc6x95axnkbuzkzw4bqz9o9zhrkedike X-HE-Tag: 1709728270-945203 X-HE-Meta: U2FsdGVkX19YkIuEEDYHNUtQby5w6VHD9FpsrHBXftr8Fl7hFefh/jtDfPCAO7673cbWDSA2mU0MPvD0vsLnMfqP1UCnymP3IAN0Q+qo6yNZcq1jxLPEsWjGW+Y08wM3LB9Oq6rPBNc8QzvIRGl0OJnZFEIIKZXApPL8FkQgB8eZ668++GkMIutdgod8KFy5mfQxn6EUoxbXrzkUyWPgT3lpix/xaOptB+Rn9v9tnGyQkrJt0rp/TnDI8d7ad+7x6/Y6j8tEOjRUQ8mxVFRgQMUkL1Qj+JyyjLY6eoC2pWCFtLKA9LF5z94PSS2BmSIu51FFSwoC5Mhi/WZE8up+7uok+PV0vTQumytcP/YzIxYXYOMp3tVrqq+B9J+DwlPCQyBQlM4x6KbXJ553soIDDbXfgbFqyAO/9hyRccmD8bUE4BX8yKXuKl3I83G/vAbVEVWc1wm568fKbws2RN8wRPK4vbBjmaLZKJ8xSWgRmkRg1OzE/ov4RXD8Q2q8aic5jjezrvW6CGRzRyiVe1q/DTyLFxFEs0JBXEyBbiYA/H3+Q7uZlxyXs2XeLlY8/yqUreTYTLJuvg46XS2I9+m6JmnhCSNLKONrXyntKLUPpbdUU0QDInYYAOE7RX45a/nCncS72+JFrCmAI3+MJJZVoDEi/OeeT72+4oqTtWyEA+6YIlBY+4Vrj3sr8LfHV1fXj7vtv8DGwpjgFMDc5OXGQgWX81FcBwCRfcLo4scqRiyvE1Vefsfd2WfpuWGhUlRwraISXJ3y0ib/6amb+ourkXzIJLLdWPoq4Y0WsdPLFiFfUuolmBtEIRUXxMj5Gvp66ZSiew6al9BMBkPhD75nmSGedISeiF6O0EU8AlWQ+Bv298DmA7xxAAjJMFJzOlvUtNTAw3EdQAt5aqJpO7JNa4jeLCqbG9juFFdyAW9uNBpbAZ7eemUPu1fPdZ8almA14uZNT0yTzrSwbs3iJam ipoCp/1i tIGNSd9tGYZlEnoJoeiL8RV4eoxagp9AxVvpP 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: List-Subscribe: List-Unsubscribe: stackdepot only saves stack_records which size is greather than 0, so we cannot possibly have empty stack_records. Drop the check. Signed-off-by: Oscar Salvador Reviewed-by: Vlastimil Babka --- --- mm/page_owner.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mm/page_owner.c b/mm/page_owner.c index 7163a1c44ccf..e7139952ffd9 100644 --- a/mm/page_owner.c +++ b/mm/page_owner.c @@ -865,8 +865,7 @@ static int stack_print(struct seq_file *m, void *v) entries = stack_record->entries; stack_count = refcount_read(&stack_record->count) - 1; - if (!nr_entries || nr_entries < 0 || stack_count < 1 || - stack_count < page_owner_stack_threshold) + if (stack_count < 1 || stack_count < page_owner_stack_threshold) return 0; for (i = 0; i < nr_entries; i++)