From mboxrd@z Thu Jan 1 00:00:00 1970 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 23A68C77B6E for ; Wed, 12 Apr 2023 08:13:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B628D280008; Wed, 12 Apr 2023 04:13:43 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B14A2280003; Wed, 12 Apr 2023 04:13:43 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9DC12280008; Wed, 12 Apr 2023 04:13:43 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 8FDCC280003 for ; Wed, 12 Apr 2023 04:13:43 -0400 (EDT) Received: from smtpin11.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 579F5C0B57 for ; Wed, 12 Apr 2023 08:13:43 +0000 (UTC) X-FDA: 80672025126.11.D781B05 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf24.hostedemail.com (Postfix) with ESMTP id 9EB3D180003 for ; Wed, 12 Apr 2023 08:13:41 +0000 (UTC) Authentication-Results: imf24.hostedemail.com; dkim=pass header.d=linuxfoundation.org header.s=korg header.b=mrxngXS0; spf=pass (imf24.hostedemail.com: domain of gregkh@linuxfoundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org; dmarc=pass (policy=none) header.from=linuxfoundation.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1681287221; 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:content-transfer-encoding: in-reply-to:in-reply-to:references:dkim-signature; bh=rb7+jWO/yTOAoRUxQ9ESz+XV+pMwgeGlmRWemP5ZlnI=; b=NqEDxuM4fF3msu7iZtK+xdnfADqDO9AnLMUpx1FzOPInYnKyOjyhCRb57Ql01qv4/0SUzT VBAuobvVhDde7kXuczglYlI5AhJPfaiNB2Z8opcN9r+uyHqDJ68ryg4ZhiAS1vrFa84mjG f2qe8bAFRQIt/bDmatOQqpmlJm9DGks= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=pass header.d=linuxfoundation.org header.s=korg header.b=mrxngXS0; spf=pass (imf24.hostedemail.com: domain of gregkh@linuxfoundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=gregkh@linuxfoundation.org; dmarc=pass (policy=none) header.from=linuxfoundation.org ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1681287221; a=rsa-sha256; cv=none; b=4CnEM/eNwJAnbK6vyOXs/XzIbC8Oq9xMg4zTrgoKGB7S3UhLEGioNuKhTExuvv6MdPzUFt UnG/aDXCr919w031mS5YArZKB3GaX6cZ78tjnkB4hkHmfxzHIZFQkWdIIZ4XWyjytjvI3t sVsvTJczqOQR2oYUb1pnDja9BWi1s+I= Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id DC13E62F55; Wed, 12 Apr 2023 08:13:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 021F6C4339B; Wed, 12 Apr 2023 08:13:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1681287220; bh=xxorW9rWmACgZvr9YxROUlu8VK5OLV5uOMJ42KLsWPo=; h=Subject:To:Cc:From:Date:In-Reply-To:From; b=mrxngXS0PARQpFbpmNTHt/Oj95ZrdEgDo6D/Qf0rMB615vAyoCPpwuZoalof/Q2LJ NpGUhydUwFwPkwrov1vm8hWSmZHyItN9Ri+HtL/sAkErGmr0cBhr/EW24688SuBcZO wdga7PQhbIeTT+D79NJ5dINYW9do+elT8G5v/97c= Subject: Patch "maple_tree: fix potential rcu issue" has been added to the 6.1-stable tree To: Liam.Howlett@Oracle.com,Liam.Howlett@oracle.com,gregkh@linuxfoundation.org,linux-mm@kvack.org,maple-tree@lists.infradead.org Cc: From: Date: Wed, 12 Apr 2023 10:13:25 +0200 In-Reply-To: <20230411151055.2910579-3-Liam.Howlett@oracle.com> Message-ID: <2023041224-clad-zesty-1c5a@gregkh> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit X-stable: commit X-Patchwork-Hint: ignore X-Rspamd-Queue-Id: 9EB3D180003 X-Stat-Signature: myq6o14jzo9g4fwqa6iu3bo34wqiubjo X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1681287221-332368 X-HE-Meta: U2FsdGVkX1+icAuV4lsJ9HDUiLnt6gk6/XtiWccKi3+mK85AkUo1wRbBs8nwcjDSEIqpW5K8a/Cb+NKs0gG6Ofb8RMc+/dIB81KOY76/QFXty26L8Z771bHK0miBhQ328FbQkT+MgDSHojmsCucg3L2D8wpt/NYGH61jn8w8wqSykigQDKeuCEiyPW6wb18aSyp4ycHrorgHWEJ7JU1bBBGTvktK/1+FLCBGxeHV/voY+iEd4V4D5sQR4M2YkoAlbdxKHJMAlXMlM31CHjUFcLM1HVa1qcH1jJ+tx07lD4e4bgnS82C2HkBhdIaZPFlHgsBQQvG8/Fy84aS1bpEK2By2ZN3weI2tq9pHnXU2IPXvT3wpG/cnMKpYigPwH3tcxyYNSGe6vxKILs/NJpvxH6KkQuGE0OkueUstBz8zdXljwzFBVsLQU2ZsGdkJhlHY9X62uYgcDMEm18ofibtV4uFnfUDURRbYUoG9mvC1XX7CsAUMRGQi0/5SMXdfhqj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sazdeKjrfg7QKKx4n2d28XWvwy7FdtPVNNQ== 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: This is a note to let you know that I've just added the patch titled maple_tree: fix potential rcu issue to the 6.1-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: maple_tree-fix-potential-rcu-issue.patch and it can be found in the queue-6.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >From stable-owner@vger.kernel.org Tue Apr 11 17:12:28 2023 From: "Liam R. Howlett" Date: Tue, 11 Apr 2023 11:10:43 -0400 Subject: maple_tree: fix potential rcu issue To: Greg Kroah-Hartman , stable@vger.kernel.org Cc: maple-tree@lists.infradead.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, "Liam R. Howlett" , Stable@vger.kernel.org, "Liam R . Howlett" Message-ID: <20230411151055.2910579-3-Liam.Howlett@oracle.com> From: "Liam R. Howlett" commit 65be6f058b0eba98dc6c6f197ea9f62c9b6a519f upstream. Ensure the node isn't dead after reading the node end. Link: https://lkml.kernel.org/r/20230120162650.984577-3-Liam.Howlett@oracle.com Cc: Fixes: 54a611b60590 ("Maple Tree: add new data structure") Signed-off-by: Liam R. Howlett Signed-off-by: Greg Kroah-Hartman --- lib/maple_tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -4650,13 +4650,13 @@ static inline void *mas_next_nentry(stru pivots = ma_pivots(node, type); slots = ma_slots(node, type); mas->index = mas_safe_min(mas, pivots, mas->offset); + count = ma_data_end(node, type, pivots, mas->max); if (ma_dead_node(node)) return NULL; if (mas->index > max) return NULL; - count = ma_data_end(node, type, pivots, mas->max); if (mas->offset > count) return NULL; Patches currently in stable-queue which might be from stable-owner@vger.kernel.org are queue-6.1/maple_tree-fix-potential-rcu-issue.patch queue-6.1/maple_tree-add-smp_rmb-to-dead-node-detection.patch queue-6.1/maple_tree-add-rcu-lock-checking-to-rcu-callback-functions.patch queue-6.1/maple_tree-fix-handle-of-invalidated-state-in-mas_wr_store_setup.patch queue-6.1/maple_tree-reduce-user-error-potential.patch queue-6.1/maple_tree-fix-mas_prev-and-mas_find-state-handling.patch queue-6.1/maple_tree-remove-gfp_zero-from-kmem_cache_alloc-and-kmem_cache_alloc_bulk.patch queue-6.1/maple_tree-be-more-cautious-about-dead-nodes.patch queue-6.1/mm-enable-maple-tree-rcu-mode-by-default.patch queue-6.1/maple_tree-detect-dead-nodes-in-mas_start.patch queue-6.1/maple_tree-fix-freeing-of-nodes-in-rcu-mode.patch queue-6.1/maple_tree-remove-extra-smp_wmb-from-mas_dead_leaves.patch queue-6.1/maple_tree-refine-ma_state-init-from-mas_start.patch