Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4635291pxj; Wed, 12 May 2021 09:43:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwxHgmRMhWHnrN5dOUXaoz+IsTa78BhNACYia0C5ShaJxAF71t+e/qmtpT//LBm6wDLbhSj X-Received: by 2002:a05:6402:17d7:: with SMTP id s23mr44501001edy.66.1620837825077; Wed, 12 May 2021 09:43:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620837825; cv=none; d=google.com; s=arc-20160816; b=nNxlpcoSDJ5KjoDO9H+uOw2vOLvPkFmE7JP2xHrSxLnlYSUWqIUPZUwti0ERL1R7o5 aJ+ZPhKl4Hpyvl1YYhIZyuN/bPcuR9gU/p7HzAVSf53dhg3ybJB9ADxfv/SRPLw0Mzcl cqqixW8j1Mny6Of7sFJSid8fOB6LGDjtc3OACEiphF38vJxvOcO1JuEMmRCA6LRErQdu s/Bbn+lD2HRYh/594DosYxV/d56n5eEVLqv75BWJ7y4WiP3n1/QrPE0KzxWyaIt0UXkL If41gNay0SxpGCwuVtgxQ4z454SiItbQrYFoQAsQLxjIBRaIxZDnB1BQ0tc7lfCkrxJM 0ynA== 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=dDlxVuYwKFdwRx9KVx6lCdKxIPQGz3etjzCVpxsGp+U=; b=zH+Lmy/qFUzeKSXGoskY+ThueAL3fSIJPfI3LpXir9l6feLqfNG9L1dq0DxUgb5DUo a+tMBhhiPhETwDN15jbOyLkbqL5ombnqzYZF6706G169o8n1ygEfFDrXt/pt0UMZ/XVC z6Ijr3QhJS+XPRT10Anra3cwfuEErQNrXU6SLc4O3rSzLOp/W/HUaKq+SnfYIuYeJLQw Wdy8F0fu8R22Cmb9kvENZ3yGojlypbszEZWgjSMdRnq+/WwE6MHs8GpSE/2P28CI3v1W jsM4M75Xuay9ZANEYZI8Rb0rOL8YrTESp2pipap1GshEsRooIwROfMlJPWtVEqYmHo9L QSiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=lBcMei9k; 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 v2si136228edc.531.2021.05.12.09.43.19; Wed, 12 May 2021 09:43:45 -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=lBcMei9k; 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 S234214AbhELQn3 (ORCPT + 99 others); Wed, 12 May 2021 12:43:29 -0400 Received: from mail.kernel.org ([198.145.29.99]:46968 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237019AbhELPrw (ORCPT ); Wed, 12 May 2021 11:47:52 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2108F61CAA; Wed, 12 May 2021 15:24:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620833062; bh=9dmZQrImYcZsKrVCViSKcFvj9lX+tG6E4/q/mPghuAc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lBcMei9kcuqd/zZr/vEmn3zJi+IAmV0rLG/c8IWYDNwISmsINUv6DC6cW4ir36sAr C37cjnVbINOIO9J5ZIXWn4bHZUq75IOHD5gQ0RmuDeMrWIu/L1ZzytQ0QMbEpuFA5x o2Qc7bikEy0cf+3xirpBBX5y5ZUUxaseva7ZdEdE= 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 5.10 520/530] mm/sparse: add the missing sparse_buffer_fini() in error branch Date: Wed, 12 May 2021 16:50:30 +0200 Message-Id: <20210512144836.843187403@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210512144819.664462530@linuxfoundation.org> References: <20210512144819.664462530@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 7bd23f9d6cef..33406ea2ecc4 100644 --- a/mm/sparse.c +++ b/mm/sparse.c @@ -547,6 +547,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, usage); -- 2.30.2