Message ID | 20241024132009.2267260-8-yukuai1@huaweicloud.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> 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 E48B9CE8E75 for <linux-mm@archiver.kernel.org>; Thu, 24 Oct 2024 13:23:21 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BD8306B00A2; Thu, 24 Oct 2024 09:23:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B87316B00A3; Thu, 24 Oct 2024 09:23:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 98C4D6B00A4; Thu, 24 Oct 2024 09:23:09 -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 78F016B00A2 for <linux-mm@kvack.org>; Thu, 24 Oct 2024 09:23:09 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 97F4AA1353 for <linux-mm@kvack.org>; Thu, 24 Oct 2024 13:22:35 +0000 (UTC) X-FDA: 82708561110.21.C9B34BE Received: from dggsgout12.his.huawei.com (dggsgout12.his.huawei.com [45.249.212.56]) by imf02.hostedemail.com (Postfix) with ESMTP id 7DAD28001C for <linux-mm@kvack.org>; Thu, 24 Oct 2024 13:22:31 +0000 (UTC) Authentication-Results: imf02.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf02.hostedemail.com: domain of yukuai1@huaweicloud.com designates 45.249.212.56 as permitted sender) smtp.mailfrom=yukuai1@huaweicloud.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1729776018; 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; bh=URv8cFzLQQ95W8goxZMrarqx/C1QHADCeil2dzsI1jc=; b=PM7HhX72jijpdHpOC4+JpO3S3SATg1DwyxoFGUdLH03cpjvIDCqvRSR8SOq0Je1I6vXQZL XUeNm9kJFU/ZLLHKQKhR38KALbbngWRF7Eb9SJWk2+eHijd2GTiRTuTPOtcdF3+ePKH1+j 5BA4WVfpo6TZ930GtcFfQPjcNydEOu4= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1729776018; a=rsa-sha256; cv=none; b=hlmMg508XLa3qg6DuLP+YqGxKro7iSNjUzWrDkxDAq8PSkkZND+CdjDOT4XtSbhYzsDQBz pe0uoUXUBGggX9lYjiuDph8XwywjuzlvACzEvKpV/r6JsSA4iVWf6XUEvO1SmHgM9pbf+8 3bxlRillsbYOK/n1d6xflce6ipKqZy8= ARC-Authentication-Results: i=1; imf02.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf02.hostedemail.com: domain of yukuai1@huaweicloud.com designates 45.249.212.56 as permitted sender) smtp.mailfrom=yukuai1@huaweicloud.com Received: from mail.maildlp.com (unknown [172.19.93.142]) by dggsgout12.his.huawei.com (SkyGuard) with ESMTP id 4XZ66D6dSGz4f3jHn for <linux-mm@kvack.org>; Thu, 24 Oct 2024 21:22:44 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.128]) by mail.maildlp.com (Postfix) with ESMTP id 683EC1A0359 for <linux-mm@kvack.org>; Thu, 24 Oct 2024 21:23:02 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.104.67]) by APP4 (Coremail) with SMTP id gCh0CgCHusYpShpn7tb6Ew--.444S11; Thu, 24 Oct 2024 21:23:02 +0800 (CST) From: Yu Kuai <yukuai1@huaweicloud.com> To: stable@vger.kernel.org, gregkh@linuxfoundation.org, harry.wentland@amd.com, sunpeng.li@amd.com, Rodrigo.Siqueira@amd.com, alexander.deucher@amd.com, christian.koenig@amd.com, Xinhui.Pan@amd.com, airlied@gmail.com, daniel@ffwll.ch, viro@zeniv.linux.org.uk, brauner@kernel.org, Liam.Howlett@oracle.com, akpm@linux-foundation.org, hughd@google.com, willy@infradead.org, sashal@kernel.org, srinivasan.shanmugam@amd.com, chiahsuan.chung@amd.com, mingo@kernel.org, mgorman@techsingularity.net, yukuai3@huawei.com, chengming.zhou@linux.dev, zhangpeng.00@bytedance.com, chuck.lever@oracle.com Cc: amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, maple-tree@lists.infradead.org, linux-mm@kvack.org, yukuai1@huaweicloud.com, yi.zhang@huawei.com, yangerkun@huawei.com Subject: [PATCH 6.6 07/28] maple_tree: make mas_erase() more robust Date: Thu, 24 Oct 2024 21:19:48 +0800 Message-Id: <20241024132009.2267260-8-yukuai1@huaweicloud.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20241024132009.2267260-1-yukuai1@huaweicloud.com> References: <20241024132009.2267260-1-yukuai1@huaweicloud.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: gCh0CgCHusYpShpn7tb6Ew--.444S11 X-Coremail-Antispam: 1UD129KBjvdXoWrtrW3Wr4UCw13GFW7Jr1UZFb_yoWkXrXEk3 W8tF4kuFs7JF4Iqw1rKrWqqa1rCa4FqFnFvw1xJF13X3Z8tFZ5KFn2gF4SkFyaq3yxJFyU CF90qrs2v3WjqjkaLaAFLSUrUUUUjb8apTn2vfkv8UJUUUU8Yxn0WfASr-VFAUDa7-sFnT 9fnUUIcSsGvfJTRUUUb98FF20E14v26rWj6s0DM7CY07I20VC2zVCF04k26cxKx2IYs7xG 6rWj6s0DM7CIcVAFz4kK6r1j6r18M28IrcIa0xkI8VA2jI8067AKxVWUAVCq3wA2048vs2 IY020Ec7CjxVAFwI0_Xr0E3s1l8cAvFVAK0II2c7xJM28CjxkF64kEwVA0rcxSw2x7M28E F7xvwVC0I7IYx2IY67AKxVW7JVWDJwA2z4x0Y4vE2Ix0cI8IcVCY1x0267AKxVW8Jr0_Cr 1UM28EF7xvwVC2z280aVAFwI0_GcCE3s1l84ACjcxK6I8E87Iv6xkF7I0E14v26rxl6s0D M2AIxVAIcxkEcVAq07x20xvEncxIr21l5I8CrVACY4xI64kE6c02F40Ex7xfMcIj6xIIjx v20xvE14v26r106r15McIj6I8E87Iv67AKxVWUJVW8JwAm72CE4IkC6x0Yz7v_Jr0_Gr1l F7xvr2IYc2Ij64vIr41lF7I21c0EjII2zVCS5cI20VAGYxC7M4IIrI8v6xkF7I0E8cxan2 IY04v7MxkF7I0En4kS14v26rWY6Fy7MxAIw28IcxkI7VAKI48JMxC20s026xCaFVCjc4AY 6r1j6r4UMI8I3I0E5I8CrVAFwI0_Jr0_Jr4lx2IqxVCjr7xvwVAFwI0_JrI_JrWlx4CE17 CEb7AF67AKxVWrXVW8Jr1lIxkGc2Ij64vIr41lIxAIcVC0I7IYx2IY67AKxVW8JVW5JwCI 42IY6xIIjxv20xvEc7CjxVAFwI0_Gr1j6F4UJwCI42IY6xAIw20EY4v20xvaj40_Jr0_JF 4lIxAIcVC2z280aVAFwI0_Gr0_Cr1lIxAIcVC2z280aVCY1x0267AKxVW8Jr0_Cr1UYxBI daVFxhVjvjDU0xZFpf9x0pR4E__UUUUU= X-CM-SenderInfo: 51xn3trlr6x35dzhxuhorxvhhfrp/ X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 7DAD28001C X-Stat-Signature: zt4md3xj19khejbmzi57m3oci3igump3 X-Rspam-User: X-HE-Tag: 1729776151-79833 X-HE-Meta: U2FsdGVkX19Lo/sWUuq5Irk5h9GklOGVBsQQjL/4E89mqF2hsCdQ6b/QzH28f8PuDxrUj3IpUG4DuIXp7TEucINLqXJ+poHayMN4RiRJ6X5BMEuy2isclAwazFr6leC5ivH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LFmJhGgfwBDXaJPwf6V2CPc4jJcthv1x5w6wufiTTUu/9PgVrtiNH8KbFZCWqcUZIdKiy7hfHOktgjQYNfJPkOGgZw== 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: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@kvack.org> |
Series |
fix CVE-2024-46701
|
expand
|
diff --git a/lib/maple_tree.c b/lib/maple_tree.c index 9de2e3dfdfcc..e4d0df3980e0 100644 --- a/lib/maple_tree.c +++ b/lib/maple_tree.c @@ -6184,7 +6184,7 @@ void *mas_erase(struct ma_state *mas) void *entry; MA_WR_STATE(wr_mas, mas, NULL); - if (mas_is_none(mas) || mas_is_paused(mas)) + if (!mas_is_active(mas) || !mas_is_start(mas)) mas->node = MAS_START; /* Retry unnecessary when holding the write lock. */