Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2356300imm; Mon, 28 May 2018 06:38:25 -0700 (PDT) X-Google-Smtp-Source: AB8JxZp774b3f+L3coXKKgXNesytlWBLSdlNsaqDR4Tammks4xn9PnLWCfIF5wHSX6h38YnnM0qJ X-Received: by 2002:a17:902:4301:: with SMTP id i1-v6mr13732030pld.280.1527514705718; Mon, 28 May 2018 06:38:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527514705; cv=none; d=google.com; s=arc-20160816; b=Tmt7tbTVlVRD8gliStFiH8k+wphVvBUFOg7LdtTGdnciGRy+/2OalUY9O8xWoKMzua AkgLqxxhPcWUWpAIRz+Nq7H7xK38QFixzknVRqEkbcOFX3tLvzc3daouOJZt4txq/1IL ODJgkXrZatB04NGlLhvDA8/EW7/zTg1uCDyLNK15osyJMdcieFzsvJ8suUStOLfdu3r3 aAsqH9gaRlqayOSSHSMnxArS7Fw8EuHxBPxXk5jFSUFPnEGBJQ63hz3F5qDMzXOLpM+G mKCufaxDgjRWH2eulMJjgD5qM9tgAlca/TE9Vpdg+MgLg/0C6FKLn8PJAAL1jUAXr9GR NlbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=t8EhklcqQyXkfgkFiQT/h+TnEfh4UPn5RVK/cJzTcI0=; b=L6luMMRgSLxO2HP3sNHngKcRdQm6Y2y4q+JP0fljs9/i19WYaK2pATVC5AiTxws4OF kUk3CbqaauT3TUbKb3cLebsPzNWG9czoLUlMruj2BtxcAz62EG8lUO9364h094bobte0 F9x9pU3G+O1rncsMMPf5X8abkTMDuqB5nwQA8sVeUgrUNAzAB+BtteqcBeQcAO9O8w30 w7AShwDVn3MQ6y3361qeGpkzAtcqyoYxi+9xn3n9PToVChGtZjppVYYA4zPgtM8jXKnb 2oO6b7sV7uNLA4zCoNw1cBciNarRZ1RovOlcEF6EAMH8P+TpZpRz4BkuP336SyDOMFq3 mbWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KhUOdSjJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d7-v6si31057845pfe.214.2018.05.28.06.38.11; Mon, 28 May 2018 06:38:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=KhUOdSjJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1165411AbeE1Ngg (ORCPT + 99 others); Mon, 28 May 2018 09:36:36 -0400 Received: from mail.kernel.org ([198.145.29.99]:35950 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1033435AbeE1Kp0 (ORCPT ); Mon, 28 May 2018 06:45:26 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8EEE8204EE; Mon, 28 May 2018 10:45:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1527504326; bh=Md/UirwxOndYXpoS4V5em+TCg8B6Yy5FwBVsvaNXTrY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KhUOdSjJRTh/BBoM0wGTuG6rzjvmC5UkojGoFIEkO6rTJEvJokQAVhiyk59sCcXui J+ZOpW06EsLB8+m6YmicYrpdMHgGPKoTcXAnEZEnYicBmLjR4ZpYoBe+FbtTy3T32N +xO9MXvJOkeG4vJbzQHYRm/IDEUksBuuoPj51TLY= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Tobias Jordan , Philipp Zabel , Sasha Levin Subject: [PATCH 4.14 097/496] gpu: ipu-v3: pre: fix device node leak in ipu_pre_lookup_by_phandle Date: Mon, 28 May 2018 11:58:02 +0200 Message-Id: <20180528100323.950633179@linuxfoundation.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180528100319.498712256@linuxfoundation.org> References: <20180528100319.498712256@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.14-stable review patch. If anyone has any objections, please let me know. ------------------ From: Tobias Jordan [ Upstream commit c795f3052b60b01e80485fad98c53e5e67d093c9 ] Before returning, call of_node_put() for the device node returned by of_parse_phandle(). Fixes: d2a34232580a ("gpu: ipu-v3: add driver for Prefetch Resolve Engine") Signed-off-by: Tobias Jordan Signed-off-by: Philipp Zabel Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/ipu-v3/ipu-pre.c | 3 +++ 1 file changed, 3 insertions(+) --- a/drivers/gpu/ipu-v3/ipu-pre.c +++ b/drivers/gpu/ipu-v3/ipu-pre.c @@ -125,11 +125,14 @@ ipu_pre_lookup_by_phandle(struct device if (pre_node == pre->dev->of_node) { mutex_unlock(&ipu_pre_list_mutex); device_link_add(dev, pre->dev, DL_FLAG_AUTOREMOVE); + of_node_put(pre_node); return pre; } } mutex_unlock(&ipu_pre_list_mutex); + of_node_put(pre_node); + return NULL; }