From patchwork Sat Feb 11 15:48:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: andrey.konovalov@linux.dev X-Patchwork-Id: 55835 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp1548962wrn; Sat, 11 Feb 2023 07:52:26 -0800 (PST) X-Google-Smtp-Source: AK7set/S3XGgRXTqVSmfOmY9o5hOT69aIk48o4z4MSLVLxyyx7rdBuF7CLZhIyjIFHg3QYhuMlKp X-Received: by 2002:a17:906:2e91:b0:88f:5676:52c8 with SMTP id o17-20020a1709062e9100b0088f567652c8mr18647064eji.74.1676130746373; Sat, 11 Feb 2023 07:52:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1676130746; cv=none; d=google.com; s=arc-20160816; b=TB1sgxuMLjLbeDL/C6E6pQEcIBDkHzp9esoRLMOGlYU6Nz+wH6ZEeRlxjvR4K2aSpu HrOG25/llLI32m5O+EaOJppu6D+a4tggW5basHUoPGNHIffOF2KzQIH4Ik6kmtca4Pfg J8idcchuPUCfSrmTsLRZ/rpCwS/gPp9F2ATm4O8bGexflvLJLMZFbXuXiWx4MojW9ANV bKVUw9nNSH6cPV23p8eXqq2MVMH6+R7Vd6BDXHQ8zNgl8B314We7qAdEvL6M7B+cnHwS 0nnSIfvpn5oQC0GbB51SWhe1yGSz0wv9LHwcZ1lk+syy1bm+fPNactP2GK2b61CGUgOK OL1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=ePdADAGgNuPhLaxQ+Eg7zNcrIY+/1S9vDM4BoYe1IWA=; b=EWCm9tGstDH0j5D991sRX8nxhnHcmVUOrvtGNeuDsaTnfbS4gDZaYzj1fCkbio6Jmk FiSnK4IlYnOBh7JONbiC2q/1oOUac1DDatK+bRURc23okfCXWR2JSkBMrXzkcCsD7tPQ 7n5m0cNsQvMzJ3P6hAJ7bAE3I5WCSsLXROmMEwtFxYPmzOcXqr+lk2NKLQ5Mo44BWB2B 0f74MDaSjrEA9NtSJ13ORblc4XOYlrpPhuqklUyEUIlla+XInhw/B1rqheLpuaSiZ2fE /Y1faedRYJzkwMnxcC6gHr/WqiLUgU4l0NqhI9lOaL3OytA1YAhupeqve4QeKw7518ug 4n3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="cC/ddxCb"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id l4-20020a170907914400b0087760357eacsi7503922ejs.949.2023.02.11.07.52.03; Sat, 11 Feb 2023 07:52:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b="cC/ddxCb"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229550AbjBKPsw (ORCPT + 99 others); Sat, 11 Feb 2023 10:48:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229455AbjBKPsv (ORCPT ); Sat, 11 Feb 2023 10:48:51 -0500 Received: from out-44.mta1.migadu.com (out-44.mta1.migadu.com [95.215.58.44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2003A189 for ; Sat, 11 Feb 2023 07:48:50 -0800 (PST) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1676130528; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=ePdADAGgNuPhLaxQ+Eg7zNcrIY+/1S9vDM4BoYe1IWA=; b=cC/ddxCba3RAt94MdNKxpHZPcZSo+8WDw42zWSx0QdpqnM68nYU/jrWKT0Dv/inhCpGFdW Mm0N1iMbRaIiLzTlMswWc6yU+xDSL7GmRWw4HEYjjSsPsC3+4EfDaRU84/WxNYbd0/T5FW 2hBVMM/PnFecuTOdwoBPJSapfoRS4mE= From: andrey.konovalov@linux.dev To: Andrew Morton Cc: Andrey Konovalov , Marco Elver , Alexander Potapenko , Vlastimil Babka , kasan-dev@googlegroups.com, Evgenii Stepanov , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Andrey Konovalov Subject: [PATCH mm] lib/stackdepot: fix for "annotate racy pool_index accesses" Date: Sat, 11 Feb 2023 16:48:42 +0100 Message-Id: <95cf53f0da2c112aa2cc54456cbcd6975c3ff343.1676129911.git.andreyknvl@google.com> MIME-Version: 1.0 X-Migadu-Flow: FLOW_OUT X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757550473130216318?= X-GMAIL-MSGID: =?utf-8?q?1757550473130216318?= From: Andrey Konovalov Change the remaning reference to pool_index in stack_depot_fetch to pool_index_cached. Signed-off-by: Andrey Konovalov --- This change can be squashed into "lib/stackdepot: annotate racy pool_index accesses". --- lib/stackdepot.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/stackdepot.c b/lib/stackdepot.c index ec772e78af39..036da8e295d1 100644 --- a/lib/stackdepot.c +++ b/lib/stackdepot.c @@ -470,7 +470,7 @@ unsigned int stack_depot_fetch(depot_stack_handle_t handle, if (parts.pool_index > pool_index_cached) { WARN(1, "pool index %d out of bounds (%d) for stack id %08x\n", - parts.pool_index, pool_index, handle); + parts.pool_index, pool_index_cached, handle); return 0; } pool = stack_pools[parts.pool_index];