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 X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CDE85CA9EA0 for ; Mon, 21 Oct 2019 02:06:41 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9C4D421897 for ; Mon, 21 Oct 2019 02:06:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="FyiLfrjf"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="b6jF/1TC" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9C4D421897 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=KzOZVlrudZMXdPUcb8yH+aFHSXuM5ZTfSye5CcqCgmE=; b=FyiLfrjfss0ZWi lzWHGxxR45vKtr8JsAb/QZjtUoKwAbnhh5LjfTWfmW+fTlLqxZlETK+dvQpknRDr+zIBP4zvZ5yoq 49I2RpbnpHlSrIjynJcyLXCgP7woja0jEI3PRjlJp21oIZguoNuXarSoFLoommbOrlApR57y1D/UA z8KhyR02adXGfH88EenbMzdMaCbZYQAWHRl3GoycZ/YMvrhx/lvnrAC5jaOO23sqg4YFrc9HDgQ3k qm/KEKXv503WQ7ySX1AMlreJOKnndFiKwtsY0/uTP+3CVX9WMYoypYUKBShPhZ4oxeQAkXKh08eZC /KlLEqQcB3debn75I8iQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1iMN5d-0005u1-W1; Mon, 21 Oct 2019 02:06:33 +0000 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iMN5a-0005tE-SN for linux-arm-kernel@lists.infradead.org; Mon, 21 Oct 2019 02:06:32 +0000 Received: by mail-pg1-x542.google.com with SMTP id t3so6753329pga.8 for ; Sun, 20 Oct 2019 19:06:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=+yWlFQ3j7MPCBznXsMHQtwJpyH73frvubd7zQPjGqcQ=; b=b6jF/1TCbvWbam16ICWlejQoSAC8+hg+CuxDEnF4riYF5Sq4SSUC+vktJEEOp4GwaL R+MVDsuCHRmEkMhueRjh3U4t/xHsfmYAd5Yomv9TltCGadViASJLNsaikB20jqDJxi8n dWVfgkI6OxuV8SrTlzu1UxF84Waqf0ymzK7EjZVebV+jJvqaIuMIp0TTrl4wcLkRQ1cg JRDHJR3HLRAy4g02+T82IvW12A/CAQAGYnqhqse9BnW+Z7pg+VV47mmjQ77JfilZzDiA +4QoCJLF0pzaHnplp75PudT0JDggsOSIJ3OGCzqSRGkdb8VVyWjD0Hk6gS3A5uCtXRqZ bMQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=+yWlFQ3j7MPCBznXsMHQtwJpyH73frvubd7zQPjGqcQ=; b=dXoRqneqjVzA33c+BSUX7nMrkTQlNGbTKwpi/yJ9xWVXTKtqQ+KLMDVgcEsc8Wxftc V6x96bW8GwLVeyO0G5IOAvCdV+TgV0SDckJ/8X3g7L1ZfJ0Ge8/a6kbu78eD7SvQPJBr 2O4OKjVfcHxx69pjV7nF8HLek5z8ffCBP4jx8cHg1zTW61ebXqWWXuJ5igrpBr6KK/yN N1Lwt+g2U4fxLx3yOPl0xrLZQK+TX4uop4If4K3YHOKg5vuk8f7Fe/s8ur7DSmwSHodH 11ZUPHRZMF4m52g2UgzcDUxDc4lNJ/CEml+U2q5PMc55+RFMRs9RWG1jxKApGUcY7isP skqg== X-Gm-Message-State: APjAAAUzWUaThDjmHfqeX4LHxBReZkBqyX2vuNfhkbRWTmEVSntOpd9d LuhKaPn3QjNuBoqQLZLHHyVb1LTq1+U= X-Google-Smtp-Source: APXvYqx+O4q4hmJUC+1LMJIMJc8cEyhGSOZvO9jUQMs0EyVIEpjKc4vVl0VNeQL6Dp2g1H3xO8GA+g== X-Received: by 2002:a63:b644:: with SMTP id v4mr7468971pgt.249.1571623588138; Sun, 20 Oct 2019 19:06:28 -0700 (PDT) Received: from tuxbook-pro (104-188-17-28.lightspeed.sndgca.sbcglobal.net. [104.188.17.28]) by smtp.gmail.com with ESMTPSA id k23sm12553705pgi.49.2019.10.20.19.06.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 20 Oct 2019 19:06:26 -0700 (PDT) Date: Sun, 20 Oct 2019 19:06:24 -0700 From: Bjorn Andersson To: Chris Goldsworthy Subject: Re: [PATCH] of: reserved_mem: add missing of_node_put() for proper ref-counting Message-ID: <20191021020624.GE4500@tuxbook-pro> References: <1571536644-13840-1-git-send-email-cgoldswo@codeaurora.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1571536644-13840-1-git-send-email-cgoldswo@codeaurora.org> User-Agent: Mutt/1.12.1 (2019-06-15) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191020_190630_946876_93CE423B X-CRM114-Status: GOOD ( 18.66 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, robh+dt@kernel.org, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sat 19 Oct 18:57 PDT 2019, Chris Goldsworthy wrote: > Commit d698a388146c ("of: reserved-memory: ignore disabled memory-region > nodes") added an early return in of_reserved_mem_device_init_by_idx(), but > didn't call of_node_put() on a device_node whose ref-count was incremented > in the call to of_parse_phandle() preceding the early exit. > > Fixes: d698a388146c ("of: reserved-memory: ignore disabled memory-region nodes") > Signed-off-by: Chris Goldsworthy > To: Rob Herring > Cc: devicetree@vger.kernel.org > Cc: stable@vger.kernel.org > Cc: linux-kernel@vger.kernel.org > Cc: linux-arm-msm@vger.kernel.org > Cc: linux-arm-kernel@lists.infradead.org Cc stable@ is used to assist in making sure your patch is backported to stable kernels, other than that the purpose Cc here is to indicate that specific people have been requested to comment on your patch. So please skip these from the commit message in the future (for this one, wait and see if Rob is willing to trim them as he applies the patch). Reviewed-by: Bjorn Andersson Regards, Bjorn > --- > drivers/of/of_reserved_mem.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/drivers/of/of_reserved_mem.c b/drivers/of/of_reserved_mem.c > index 7989703..6bd610e 100644 > --- a/drivers/of/of_reserved_mem.c > +++ b/drivers/of/of_reserved_mem.c > @@ -324,8 +324,10 @@ int of_reserved_mem_device_init_by_idx(struct device *dev, > if (!target) > return -ENODEV; > > - if (!of_device_is_available(target)) > + if (!of_device_is_available(target)) { > + of_node_put(target); > return 0; > + } > > rmem = __find_rmem(target); > of_node_put(target); > -- > The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, > a Linux Foundation Collaborative Project > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel