Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp924681pxb; Wed, 6 Apr 2022 04:27:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOihKH6o19/y2vKUdeDYRyRPn92sCP0LLW+jrKFb4UKdmUBZynyjq4EbLGLGNpFAzdAkyC X-Received: by 2002:a17:902:db0d:b0:14f:b047:8d22 with SMTP id m13-20020a170902db0d00b0014fb0478d22mr8101017plx.90.1649244423249; Wed, 06 Apr 2022 04:27:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649244423; cv=none; d=google.com; s=arc-20160816; b=tuXsCKzV5YFVNh/koQCn1b3QYGgAteRWa8yvzsaCqg8CAb3PBW4uoW5DMQAYC/Bmnb 8lQiX4uYkBasgEp3toEVJGD+PTiMZ05ZzAQm56pl5f6l+4RbWsyhJhagV1WuDbAmEVXo GaXWgg2Lxusmsc1YBWL80xxMyyqkjm2rx6sSjPXtBs7IbQsFCzsDS5ndh5l83FhUzW9f HFqPF8u5tniat46LMakkrMXJ+keit0q/78qW8IjAu1KZRZRucVhds3N6W2Y5bt1f0IQo hOsPDelSuAP14KGu/lDiVIwspdsZaAEVuJfYlGy7+lUEpWGOdPpwwBfMlQ3loS7P4FZw IJyQ== 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=pquW1VdRB7+nNRuxvWzUaJT7wB/SmHnNK+AoLv83SNs=; b=r9S6w0MZDAc4VauQui1upHX+1RszSXYBjnUcS9KBwAoUCYOY0qopRoqt2jnDd6KWZ/ g4SxemNHytaqnmsXGQMzuUfaC0GudOtS2eY9Q4RSrqfg1YPRP1rFyviQDtV511eRSHN1 jtHLtW95d43YDc46TaqkcrTiZNOQvtlrn6zZYS2aGGVD+Ky/0i8NyRXCVEj+HXNJXbe9 yW5ow4F1OfReZIgnux3a6AXpn8bXsxJVvkiWyM7QkTS52Va0+MxmJ6JgduR8HxTPKBrm nU8hFSu88PR/OI1Ct7h0p9Qql8zIu/XqLvtylvhGlkm5TCqUOfr8AY07cFrZhJclNigt 8syQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kUZqkYbu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id a2-20020a63d402000000b003983e878483si15519463pgh.609.2022.04.06.04.27.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Apr 2022 04:27:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=kUZqkYbu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1: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: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 5266847C3D8; Wed, 6 Apr 2022 02:49:14 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355196AbiDEWms (ORCPT + 99 others); Tue, 5 Apr 2022 18:42:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47312 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349211AbiDEJt1 (ORCPT ); Tue, 5 Apr 2022 05:49:27 -0400 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D1C122B1F; Tue, 5 Apr 2022 02:42:49 -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 sin.source.kernel.org (Postfix) with ESMTPS id EE952CE1C6F; Tue, 5 Apr 2022 09:42:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 11453C385A2; Tue, 5 Apr 2022 09:42:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649151766; bh=OtMJiNTcTHUQcPH4dSGJwZZlh+3lpDszUo2IbFnk9JM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kUZqkYbugCwFPooCbkRwFGPm/qokvEgn2EGt4EPk6tRa8PJ7rkzJter5iIns9Rsdi FZhYNfyXYTVW28nd4075CY0mMw21UJZmSmoD2xiX5HyN2J2w7PWvc8vYCDvkAlYqQ3 tNH/Q9Wj+7/hzfYL1ZBmvLw4duQV25Ou+C1nz8cU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Miaoqian Lin , Serge Semin , Thomas Bogendoerfer , Sasha Levin Subject: [PATCH 5.15 532/913] mips: cdmm: Fix refcount leak in mips_cdmm_phys_base Date: Tue, 5 Apr 2022 09:26:34 +0200 Message-Id: <20220405070355.796436628@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070339.801210740@linuxfoundation.org> References: <20220405070339.801210740@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 From: Miaoqian Lin [ Upstream commit 4528668ca331f7ce5999b7746657b46db5b3b785 ] The of_find_compatible_node() function returns a node pointer with refcount incremented, We should use of_node_put() on it when done Add the missing of_node_put() to release the refcount. Fixes: 2121aa3e2312 ("mips: cdmm: Add mti,mips-cdmm dtb node support") Signed-off-by: Miaoqian Lin Acked-by: Serge Semin Signed-off-by: Thomas Bogendoerfer Signed-off-by: Sasha Levin --- drivers/bus/mips_cdmm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/bus/mips_cdmm.c b/drivers/bus/mips_cdmm.c index 626dedd110cb..fca0d0669aa9 100644 --- a/drivers/bus/mips_cdmm.c +++ b/drivers/bus/mips_cdmm.c @@ -351,6 +351,7 @@ phys_addr_t __weak mips_cdmm_phys_base(void) np = of_find_compatible_node(NULL, NULL, "mti,mips-cdmm"); if (np) { err = of_address_to_resource(np, 0, &res); + of_node_put(np); if (!err) return res.start; } -- 2.34.1