Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp364926pxj; Thu, 20 May 2021 11:04:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwSIna691k+5Y/Jdg96tW3H4RbKUn9gzyJEY4mkX0b3s+8pbxRIwAZlgCZx690i+t+oDj0w X-Received: by 2002:a05:6638:2728:: with SMTP id m40mr7991971jav.55.1621533891859; Thu, 20 May 2021 11:04:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621533891; cv=none; d=google.com; s=arc-20160816; b=oUvQePEKMIIuxqvj+ua9x7NhxPmqADjWQta1OhjgKxX0wdRjC+B5hz8Qva9ATVeujS IIkZTICsk3O/vuTcSZD9GB3OmY2JGteN618XC4QVsHlKdmjaJrSm+dxkQiyyiCPXxEux DfvPAsWAOlhWTPM2qqKVoxOpxF6GCUMtp5hnr3/XmLw1AfwoNPnFN3K0h8sc4fSjgt0F oHC4ivcdCiv8GNeObPt9wvzWrEsBxiLuTgINpxmJGfJ8s8w6BVNqeGYNxJQtsTEVj9pC nq3AjgiBJkNIe83vrT54+13hVqfwMsIf04ggRsnbRhAQMmMzEIL6nbb1pNw0j//UCk4z izqg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=9qsdSUm3tW5UeCjfPJxQFo8yn0CM4cDmvc+xz6ouJrQ=; b=CFRySS9mMet42NbedPo7zQJifeOIgPpUkiVYzCf1mXvbbmz5B5XfhQqo0MH+AMG1bn dIteOV5tdKxmbeTXRZmLh/QnkDB+PfU7AQ6VLO6PDH9Xd1o1dhbBixgxRijcVCnEWmx3 S9lqTWz6cU6Tiy5QX1svrrZ7tAmpx/8v/TZ3BvAx+PgbfrlHdlMTgNQn4/sbNn+8dyS2 yq8jIFVaKiatCnL15ILEDmyOJgJjimwS8+Hzqp64R4qKumFDj2DQKBzA4w4kIjefMyVo ibTYa6gIwCg3Re841BcPmcHqrqLqa2t01lm5YHYyd8Df/9avhXqY1xrSdnyj91ngqlUv TWhw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YJ0wPcx8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e194si3037083iof.53.2021.05.20.11.04.33; Thu, 20 May 2021 11:04:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=YJ0wPcx8; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S235839AbhETKMp (ORCPT + 99 others); Thu, 20 May 2021 06:12:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:37296 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235587AbhETKFY (ORCPT ); Thu, 20 May 2021 06:05:24 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 07DDB613DC; Thu, 20 May 2021 09:41:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621503672; bh=datGG+ULmL2SRs8W4f2zAfv1mM24UTw08EVWAF2wmRY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YJ0wPcx8knqmU8EbU8aBb739Qyy460BFNKBi4DPoGJWCUtwWEYr4dlP6hL7UMQjGx je1FsLc4sKnq7UWJlMkqNS/JV93OXn4rI9SleY+GwcdBzETAcvU6m5/gAHW+eo8/wX x+7cBUTSWAQkajaEmb4EqC0iiS6lpr4Gal3Bvf5I= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Wang Wensheng , David Hildenbrand , Oscar Salvador , Pavel Tatashin , Andrew Morton , Linus Torvalds , Sasha Levin Subject: [PATCH 4.19 293/425] mm/sparse: add the missing sparse_buffer_fini() in error branch Date: Thu, 20 May 2021 11:21:02 +0200 Message-Id: <20210520092141.081872654@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092131.308959589@linuxfoundation.org> References: <20210520092131.308959589@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Wang Wensheng [ Upstream commit 2284f47fe9fe2ed2ef619e5474e155cfeeebd569 ] sparse_buffer_init() and sparse_buffer_fini() should appear in pair, or a WARN issue would be through the next time sparse_buffer_init() runs. Add the missing sparse_buffer_fini() in error branch. Link: https://lkml.kernel.org/r/20210325113155.118574-1-wangwensheng4@huawei.com Fixes: 85c77f791390 ("mm/sparse: add new sparse_init_nid() and sparse_init()") Signed-off-by: Wang Wensheng Reviewed-by: David Hildenbrand Reviewed-by: Oscar Salvador Cc: Pavel Tatashin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Sasha Levin --- mm/sparse.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/sparse.c b/mm/sparse.c index 3b24ba903d9e..ed60f0a375fe 100644 --- a/mm/sparse.c +++ b/mm/sparse.c @@ -467,6 +467,7 @@ static void __init sparse_init_nid(int nid, unsigned long pnum_begin, pr_err("%s: node[%d] memory map backing failed. Some memory will not be available.", __func__, nid); pnum_begin = pnum; + sparse_buffer_fini(); goto failed; } check_usemap_section_nr(nid, usemap); -- 2.30.2