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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 23909C6FD18 for ; Wed, 19 Apr 2023 19:49:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231442AbjDSTtK (ORCPT ); Wed, 19 Apr 2023 15:49:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229504AbjDSTtE (ORCPT ); Wed, 19 Apr 2023 15:49:04 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D68651BD8 for ; Wed, 19 Apr 2023 12:49:03 -0700 (PDT) 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 736AD64202 for ; Wed, 19 Apr 2023 19:49:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9C9DFC433D2; Wed, 19 Apr 2023 19:49:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1681933742; bh=tJAJOI4zNpAbAbSJ2yiWr+f0FAyzO0/dqLTfBJ1SAuM=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=YZ6MVO3RRUTR+rziKBAQ2Slq8Tjj2nwPpk/s6NbJ25w8iAiaFw9c8aDVrmXDscW8Q ic0xEnsKEGMniLygHDocWC0YQtdfkMLVkJ2JquZUY4SCkkHYMbfR0hjIUSbmIled2o xxMKQ+QHowfWK2eJAk8cLimZAvft7Mf7r8XwNt7U= Date: Wed, 19 Apr 2023 12:49:02 -0700 From: Andrew Morton To: Peng Zhang Cc: Liam.Howlett@oracle.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, maple-tree@lists.infradead.org Subject: Re: [PATCH] maple_tree: Fix allocation in mas_sparse_area() Message-Id: <20230419124902.7cb9b5c54afa37736e7b0e3a@linux-foundation.org> In-Reply-To: <20230419093625.99201-1-zhangpeng.00@bytedance.com> References: <20230419093625.99201-1-zhangpeng.00@bytedance.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 19 Apr 2023 17:36:25 +0800 Peng Zhang wrote: > In the case of reverse allocation, mas->index and mas->last do not point > to the correct allocation range, which will cause users to get incorrect > allocation results, so fix it. If the user does not use it in a specific > way, this bug will not be triggered. Please describe the user-visible effects of the bug. I assume "none", because there are presently no callers which can trigger it? > Also re-checks whether the size is still satisfied after the lower bound > was increased, which is a corner case and is incorrect in previous versions. Again, what are the user-visible effects of the bug?