Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp32140684rwd; Fri, 7 Jul 2023 09:12:11 -0700 (PDT) X-Google-Smtp-Source: APBJJlGWCaiD7A5k3+K2NNZHUoarLkftX66eI2zxgUWszqFkqffnmum4+PvR0HLsIw9Zn4Wzx56r X-Received: by 2002:a17:90a:9204:b0:263:3b44:b0cd with SMTP id m4-20020a17090a920400b002633b44b0cdmr4211556pjo.44.1688746330930; Fri, 07 Jul 2023 09:12:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688746330; cv=none; d=google.com; s=arc-20160816; b=LzdgjStD5XV//TE8VSz/HRSVwxNgrns/2Zt6xJBtKyY24rxLNbMQ0XY4KqCvpyIpbs S5otgYzLjthNai8D3qvcpN9KhPK+xTM1Iq0U3Jc9jZA/FQ1CQYpPmX27edaAxOMUKQs5 f3C0wqyt2oJvi4nYHD6uY0GhSs4ZR+tB3EIPFuP3o3j/4Gq01+v61IYdbn0FD8dQ9v/r y02Fhu7VFVW6AIN+dJpMBdIrwulA5wZsMpOPklRc3mCgHbjezQ/N2Ub0ND+fWem5fGhO 4J++X7k0yHT3zaJNNhjc1bTpZFt8Jko1ykzW8XfjrZmpB9AWyIIpumnJ5UkOBwFA8x0Q 8tyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Nu+pM9A7Tn0mPaaMwZcDkRe9m8dmL4O6ss3hpCnkgqE=; fh=y8Zmvv1rBhEgshlc7hbkWHTWwgn3PujATiUyZXtlfrM=; b=tQeGNerWihRoOMUpFuZGC8wEtmtC+lnvnZuVbOE9Sc0ESxoceFIm8yLJkD/52+2IfB HYxBMSr7tXquIhsHLrkKPbf7pCp9z9JiK8D2I2mY4nPi/P7aPBsN07SnaywtmEN9tFxJ +ir6Y+VUkxtqrpL6YYr1gjUx4hhk2KCGk4N/oV3+4tIXOTkaOZ/R7bpQB29iSqMwTOaX sw0LI7l/FJqI6Icvyu3q3/O0Cqmvb41OxInOJFDson6hfZHQQ3sEjZhYgkqNymifp516 avR0rFQNdqJxcG2bS5SK/MbohMv/1OH5cvfugnqR41oVdH/UsfjzGPpeqceG8zrsViuG Ae2Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=sUQTi0bt; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v186-20020a6389c3000000b0053f33ec5635si4123138pgd.865.2023.07.07.09.11.58; Fri, 07 Jul 2023 09:12:10 -0700 (PDT) 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=@linuxfoundation.org header.s=korg header.b=sUQTi0bt; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232391AbjGGPzc (ORCPT + 99 others); Fri, 7 Jul 2023 11:55:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229665AbjGGPzb (ORCPT ); Fri, 7 Jul 2023 11:55:31 -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 929DDFB; Fri, 7 Jul 2023 08:55:30 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 26F97619FC; Fri, 7 Jul 2023 15:55:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0A3BFC433C7; Fri, 7 Jul 2023 15:55:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1688745329; bh=w8KYR6gzrUNFbtKM/p+G+JdWO4JfsO1K+O7KqoUEqtc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=sUQTi0btfsvZqBKWmLBywAmzE41jyD42XPM9Zc0dUv/PHx768itGsSGmaM9v1lkM8 P6YWSL0IecjEdMvfbaCTPnDN8ogTsxy9nwnArRewdXEzITBuVKLtDESLlAVpZZSAnF Zp7UcmmV1sQecT3Qc+DiOgs8JpBP9b5SrEtQtmn0= Date: Fri, 7 Jul 2023 17:55:26 +0200 From: Greg KH To: "Liam R. Howlett" Cc: linux-kernel@vger.kernel.org, Andrew Morton , John Hsu , stable@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH stable v6.1] mm/mmap: Fix extra maple tree write Message-ID: <2023070748-confiding-abnormal-b7e3@gregkh> References: <20230706185135.2235532-1-Liam.Howlett@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230706185135.2235532-1-Liam.Howlett@oracle.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 On Thu, Jul 06, 2023 at 02:51:35PM -0400, Liam R. Howlett wrote: > commit 0503ea8f5ba73eb3ab13a81c1eefbaf51405385a upstream. > > This was inadvertently fixed during the removal of __vma_adjust(). > > When __vma_adjust() is adjusting next with a negative value (pushing > vma->vm_end lower), there would be two writes to the maple tree. The > first write is unnecessary and uses all allocated nodes in the maple > state. The second write is necessary but will need to allocate nodes > since the first write has used the allocated nodes. This may be a > problem as it may not be safe to allocate at this time, such as a low > memory situation. Fix the issue by avoiding the first write and only > write the adjusted "next" VMA. Are you sure this is the same git id? The one you reference above is _VERY_ different from your 2 line change below. And the changelog text is not the same. confused, greg k-h