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=-6.8 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 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 3E08EC43603 for ; Sun, 15 Dec 2019 13:31:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 092DB20700 for ; Sun, 15 Dec 2019 13:31:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1576416661; bh=mmXrgE6KgSTIrTmCxHVYzCNuLUJdejppk9iBT1MiOE4=; h=Subject:To:Cc:From:Date:List-ID:From; b=xWenv5JtGyVTQuHAHeX9RLU6J0pGMtNWMhDDGCTEJKaGDwh0o4JWgPZNR25e1qFHw JEGppVbeDAie8Y5ZgaudpQ69vzKALb9XF3nloPJWfUCUcAIYan3VCfvO9iNr3EC1q2 +O6PxHOjV3ye40PcTxXzA9lKw9CHIBkut0uOnDNY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726118AbfLONbA (ORCPT ); Sun, 15 Dec 2019 08:31:00 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:52147 "EHLO out3-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726103AbfLONbA (ORCPT ); Sun, 15 Dec 2019 08:31:00 -0500 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 3A9B22235F; Sun, 15 Dec 2019 08:30:59 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sun, 15 Dec 2019 08:30:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=0rvPPM I7RuANtRleoMgDHlx6PpioluOpJHm1aTOKYLA=; b=VaaY3hpzeOGkJ5SAetfVu+ KVbe19XK5iJMObYhKW68WKUG4FLvwEsl5P8FysbUY+nKMGhGgxCxCb9Q5bsXupeu L/SHORRhT0hCQ6ZYZABSJWlGgAjb5S1gyltrmF10zYA3t2V+FE1AgUdBDx04HWll UyGxnoE4w6QPjpIF2DVixKq6dYezOVU6rf/9DNG5n4h6B6w/PxQZDzQKNsl5Fafh 64GyhokffJ5+/hkEuaDbaa04+N2qGG/nSFUj7/ri9fp2bmL0v5NuVe9yiNpRu8iJ EC3QXhWQvq7R4Sf+pgX3VEnAOGKACG6avcqAmUAxMzhRnlpblZaBgzojmBrhLhNA == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrvddtfedgheegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvffhfffkgggtgfesthekredttd dtlfenucfhrhhomhepoehgrhgvghhkhheslhhinhhugihfohhunhgurghtihhonhdrohhr gheqnecukfhppeekfedrkeeirdekledruddtjeenucfrrghrrghmpehmrghilhhfrhhomh epghhrvghgsehkrhhorghhrdgtohhmnecuvehluhhsthgvrhfuihiivgeptd X-ME-Proxy: Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) by mail.messagingengine.com (Postfix) with ESMTPA id 99CCD8005C; Sun, 15 Dec 2019 08:30:58 -0500 (EST) Subject: FAILED: patch "[PATCH] pinctrl: samsung: Fix device node refcount leaks in S3C64xx" failed to apply to 4.4-stable tree To: krzk@kernel.org, stable@vger.kernel.org Cc: From: Date: Sun, 15 Dec 2019 14:30:57 +0100 Message-ID: <15764166574589@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch below does not apply to the 4.4-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 7f028caadf6c37580d0f59c6c094ed09afc04062 Mon Sep 17 00:00:00 2001 From: Krzysztof Kozlowski Date: Mon, 5 Aug 2019 18:27:09 +0200 Subject: [PATCH] pinctrl: samsung: Fix device node refcount leaks in S3C64xx wakeup controller init In s3c64xx_eint_eint0_init() the for_each_child_of_node() loop is used with a break to find a matching child node. Although each iteration of for_each_child_of_node puts the previous node, but early exit from loop misses it. This leads to leak of device node. Cc: Fixes: 61dd72613177 ("pinctrl: Add pinctrl-s3c64xx driver") Signed-off-by: Krzysztof Kozlowski diff --git a/drivers/pinctrl/samsung/pinctrl-s3c64xx.c b/drivers/pinctrl/samsung/pinctrl-s3c64xx.c index c399f0932af5..f97f8179f2b1 100644 --- a/drivers/pinctrl/samsung/pinctrl-s3c64xx.c +++ b/drivers/pinctrl/samsung/pinctrl-s3c64xx.c @@ -704,8 +704,10 @@ static int s3c64xx_eint_eint0_init(struct samsung_pinctrl_drv_data *d) return -ENODEV; data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL); - if (!data) + if (!data) { + of_node_put(eint0_np); return -ENOMEM; + } data->drvdata = d; for (i = 0; i < NUM_EINT0_IRQ; ++i) { @@ -714,6 +716,7 @@ static int s3c64xx_eint_eint0_init(struct samsung_pinctrl_drv_data *d) irq = irq_of_parse_and_map(eint0_np, i); if (!irq) { dev_err(dev, "failed to get wakeup EINT IRQ %d\n", i); + of_node_put(eint0_np); return -ENXIO; } @@ -721,6 +724,7 @@ static int s3c64xx_eint_eint0_init(struct samsung_pinctrl_drv_data *d) s3c64xx_eint0_handlers[i], data); } + of_node_put(eint0_np); bank = d->pin_banks; for (i = 0; i < d->nr_banks; ++i, ++bank) {