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: 13137138 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 83445C636CC for ; Sat, 11 Feb 2023 15:48:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9D39D6B0072; Sat, 11 Feb 2023 10:48:53 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9839A6B0073; Sat, 11 Feb 2023 10:48:53 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 825616B0074; Sat, 11 Feb 2023 10:48:53 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 74DEA6B0072 for ; Sat, 11 Feb 2023 10:48:53 -0500 (EST) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 5777DC070D for ; Sat, 11 Feb 2023 15:48:53 +0000 (UTC) X-FDA: 80455444146.09.F59DDA4 Received: from out-101.mta1.migadu.com (out-101.mta1.migadu.com [95.215.58.101]) by imf27.hostedemail.com (Postfix) with ESMTP id 9F05340002 for ; Sat, 11 Feb 2023 15:48:50 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b="cC/ddxCb"; spf=pass (imf27.hostedemail.com: domain of andrey.konovalov@linux.dev designates 95.215.58.101 as permitted sender) smtp.mailfrom=andrey.konovalov@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1676130531; a=rsa-sha256; cv=none; b=45kMcf0/bDsZMhfbf9YvfzTVxnoewTlLcdWN+PAf49lZ+DXeoJOkoNPbUvMvsHLhNvgcOJ R86TMJYyhwVWuu9RNjziAeLXHAt60YQCl8/RrIm3lphCwWudAu4FfduNWB/G8xi/yC6mbX w0zR2h4oAzTfrNb8CTGe//iNcy6djOs= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b="cC/ddxCb"; spf=pass (imf27.hostedemail.com: domain of andrey.konovalov@linux.dev designates 95.215.58.101 as permitted sender) smtp.mailfrom=andrey.konovalov@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1676130531; 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:references:dkim-signature; bh=ePdADAGgNuPhLaxQ+Eg7zNcrIY+/1S9vDM4BoYe1IWA=; b=uPIm/eC7a1wwe/JivERdWBD0vOo3ljPAcGPE3I7Jx2gFJ8zTGI7dJBicAbrWZc9zAKJk+T 5LVw2yTPqZrdAjyW7mWcf4k8cb3MIyV87pAN5uG1C4AHFyxk5XZy970twpyF1wo9LfVG5i algEGcQUiTGbxxpJxJdxxRs2ghqWkvU= 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-Rspam-User: X-Rspamd-Queue-Id: 9F05340002 X-Rspamd-Server: rspam01 X-Stat-Signature: q8cbigob9qdww7ihqup64jkr7q41e3u6 X-HE-Tag: 1676130530-424057 X-HE-Meta: U2FsdGVkX1+E4ssugFYCvWnGH/1oD1YZR7e5qT2W/oFtTRIpgFbj0/ZTiw+VKldGauJzKFFkbsCFrGn+2BodKPY127tjC1W8T6pNADyVXCGfYaGD91XKdWtW42CAhGNAZV+16MaaRMXCKBBIXTZLxuqIxir6enEMmtvwoH1pFRKsPvxhoXP8c1oPvZHe3Cm4d88Jf26LKTL0mrj3rjdHzoxZj9xAK8glPJhZDbI0JtCY1/oFpN/nAxzq2Juc5tELiOBQ03PCs+jV0elL83dH9m2/d/AdKLlJGukwRfZ+LgcA5GdIDp4FcK/sWkRpNNnbyHg7PvRz50a3OhiyjSMND0M3VyFjNUWApEWSne5btyIICViB74SKsjKr55tUFwx7oaR27SmhUxmBUtHIfZdwP0Apg5ZD5TpLQoWVC15738kx7wicl0wHD8iJO1W4GQOYXj3cQue+Hv5Wt+AMQsjI42LhRVTlCPcgiDbZXVr9q5CpoV3Bf8BgRJicSVBkjKE3jf8h+6BG1DD9JFh3Fg3XN1c29+2LKRzREcIOemCEjFHUlIdqq1ilx//X6YH+Usr1wxTMUw4cbHGAeNJDWe0HrqKOpjtJWf1AgjGLRiKqR6V2kPjXMAYrTM/xBy/pSO8QC8x/rVtq65Ju9PjbgvksPd6N5scOD9GSnsx2UPEzlgDertgubsnWfOb5P6flxG64U/Kz/HmWtsLyzycwr79YLoYx4zfh0ufnFxP1IFpC5SlmRTjse1+iE2JHwFgCdO+L4GkE6ww0rR1splw8Ulnlu6V5Q/idRVC3s3fqxd2LZilJtYz++SUEqinBxZgcHd5ydtKJAq5T1DyI58dMFYv9xtF6ctpDFSaflsjpHYeWgMXRSVl6jOrEz0HekPfLUjF2gssUvDwivIaRPKUAPhMB9+8Ecw3F7jFJoGDYSpYEmnh3rYiy3MWN+YBRpp5O8vFw3ZfiPFhVmhdaxWPIGXW sDSYRGZd FlAQWTVBPPKMhMTbrU8HvHgnVDHUXJCvO8bKWLZHmlOBBCzmM8OL1kg0pgqO/CwgAxGYUNPX8FMNLB7N1YA9mkoKJzGgnkRviATM/PVVE6tTTwlo= 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: 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];