Received: by 2002:a05:7412:798b:b0:fc:a2b0:25d7 with SMTP id fb11csp875268rdb; Fri, 23 Feb 2024 02:57:29 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCW/GpvTfqWqV9jbvIICq0IgyAuVfa5qAFnLtoTvL6PXY6VV8PJPPLV5c6HLLXlA0TviMFIVLidNxX9KSUPIGF+xmtzzzLF44SF5nRtqDA== X-Google-Smtp-Source: AGHT+IE2kqyASwc3tompXtqYnE+Dmo78zIH/iUHiD2VffA9LKLZSEOlJ/R6Qg0R0VfYUkez0di1t X-Received: by 2002:a05:6a00:b91:b0:6e4:8c40:3f09 with SMTP id g17-20020a056a000b9100b006e48c403f09mr1468297pfj.25.1708685849500; Fri, 23 Feb 2024 02:57:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708685849; cv=pass; d=google.com; s=arc-20160816; b=rVO3vN2dTEbnuyLfSiaB2CEQaXQSv2HmbM1PvNfpfxWHa/ELfAQjHb5t1SfNp6dTJ4 NAzbzzyf4D3itbAhlIVZVNyi+tI93W8aliH6oZhGgpkl1X0Zi5PjcWut1buUMQWBe1gt ittjqy41RR7Ng1dQ3bh4PJcSkB5qahwJQua7mGcZEQxPvsHdKDxM0YOKvQTVFHPnG1xE 2GYh0owj5buG2SuRgpTNfSAD2hZk+PsPRLy3H0Xnmj3AkG2V0tNjWiGcANJSB+wUOpAI oej/LOkY/XzDg8pODPkg6aE5dvF05dae6dxOEGrih/fICAQpNg/AM1Gr3zqfMML8EdNO Q/Bg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:organization:autocrypt :references:cc:to:content-language:subject:reply-to:from:user-agent :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :date:message-id:dkim-signature; bh=MpP8FPur0ZRYYFc1Wrt+q/AzhU6BvtHVrmCY1eGQaCU=; fh=j9Y+x4TOYihkTYBXu3YmF9/FOi/ii1u1fLL+TjGus8M=; b=E6IcTn3J8J+YBYF4CASBwHauUPIBZZXdZqt1XwKKOTcDWqVL8gXP6FkTiNE9qALw0I AHovxWueII1m1OuIeX53O5FhfIMM0zyq3Vi4xjf2+AA9csGU0zhxOc9Y0iyAvaFHUxMd BfgjpJDEZHWnQixL5YPEWDYr6YlZ6ApA6x6WcG1F3nRcj6xRLyZQBx0yskQRpEnfq+R5 crepa5ooYEx1gFxchUvVTKxdT5t5cJM0flyEFc6TpWkypmgdZp2RiD0uRweg0ulbhsvS POhnsa+fY6d8rv6gMnmhAAdFZ9WNSWVIMWaXjhTfAGgyA+ebN0YGKyGLlKlM2fXh9/8H uTWg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=X4x7U38+; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-78184-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78184-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id k16-20020a6568d0000000b005dc84ba3c3asi11913224pgt.287.2024.02.23.02.57.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Feb 2024 02:57:29 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-78184-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=X4x7U38+; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-78184-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-78184-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 387B22872EF for ; Fri, 23 Feb 2024 10:56:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 02778171B8; Fri, 23 Feb 2024 10:56:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="X4x7U38+" Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 449AD405F2 for ; Fri, 23 Feb 2024 10:56:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.54 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708685795; cv=none; b=ThsHYeiyWmtu91yRR04peUMN66RF5GJorQ5cnnBNiMHFKbK57l6B+svYCoxtO0I41571xPezQKpzNZG9Yw5hlvzQjIfsidFBcqv2RP6quCjPkkWJn/IoAFEUawWTqja+wiPgHllsoYQmQuiwwkS3y2VHEAYNZTmmAktp4mDAurw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708685795; c=relaxed/simple; bh=JzvY7awSwq0q/UxG/6KHL0K/oyyz19vBqdVD90kYxB0=; h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References: In-Reply-To:Content-Type; b=Eg/FhYZY9tq+7wKBA5yQbDw1gsKjraqzNX2hHWQih7Y8JuXtZDPe160Edo2VQ8GmQJ/PnUBp6P2G58vF3HykeVTxqMzxWjZohvlDRw0QxBG1rFtP4fpNrDk3i7Du36TJFDkoIX47q7xEfwrsl11D5nZColZYU7haGyMLmMvYwh4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=X4x7U38+; arc=none smtp.client-ip=209.85.221.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-33adec41b55so493491f8f.0 for ; Fri, 23 Feb 2024 02:56:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708685791; x=1709290591; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:organization:autocrypt :references:cc:to:content-language:subject:reply-to:from:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=MpP8FPur0ZRYYFc1Wrt+q/AzhU6BvtHVrmCY1eGQaCU=; b=X4x7U38+lnKFJG5ZPZo+Ad6xgsMKx7pAwLU1NQ79dBBSkyBAEGL+7OpURHa8LoCk2i BlEUDzASnIt4kl4Ow6vWUURvjcGCVukrRvPNb4lEBsEOL2AGkJLT3/RKBfGyzGcy/h8n nOsCCrvahJk0i7Q5aMaPo6vopb2bRcCS0ixyYKiNNRtLlH3jJhjhOKC11ZtQLbIf6r2E bv7FrSgdi6wkxzSeISuV/D4hMgRz4a37NcnRxGc7KZRLmHAzd39lc3MGBgXQ7IrUU+V5 T/efSjiuVCvtEndpBs8dHSuc6AGTkv+Gw8xFb75+qL+v32drqI8wopveF3qT+xyTEEfW DRvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708685791; x=1709290591; h=content-transfer-encoding:in-reply-to:organization:autocrypt :references:cc:to:content-language:subject:reply-to:from:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=MpP8FPur0ZRYYFc1Wrt+q/AzhU6BvtHVrmCY1eGQaCU=; b=dNiLAsnciQ896O9nN86y0T6HVUyaJFWeBsfoDnB7toM+hVLX8jVYPR3nmpIo5h3oqS 7CTWMvbPmn0W3OroAC4taFtKwsA5HVz2aCRN5GKQ612wGtCGe3XYzpsvRrRGSyhS8qKp 5zDMwPbDVNkCfcZvfZEzs1e2mFRks4Q+AyHmXwcUG7iKn0SPBvHdF6f4g8MRSJsY/SWr lxzveXgQOyWBvKRbLfUc5L7UtDRkO2r3icCnkajHgvPGra2ANsSjmgPIgNpWfkWGgphf tNPoFUREFhqEnpszuvCQmuLSTpLFrAjdVnRsk53+o35N51agct0ABJlUyCjFt8jrpRFc WP0A== X-Forwarded-Encrypted: i=1; AJvYcCXd1KTa1yATxkOaKda3xQBtYlWiV37ZqPCakoD+OMINSLiBUR5EENlM97gypMafI0n5rV5mkVcNLCjvRG9uPYhQAjkR0m30AV//mW5F X-Gm-Message-State: AOJu0YwqCmrDqd5BI0N4iIEmP9karPS3tYiyZIGbDgE7FNTBJWFIck2g sHoSdJwXiG6BvPNGSmZ+V4k4ZWeQza7xRicCDDz4nHfm4Y4GQGAvlKCWy0EF2nQ= X-Received: by 2002:a05:6000:12c1:b0:33d:3566:b5c5 with SMTP id l1-20020a05600012c100b0033d3566b5c5mr1264108wrx.7.1708685791556; Fri, 23 Feb 2024 02:56:31 -0800 (PST) Received: from ?IPV6:2a01:e0a:982:cbb0:58e3:6b80:c446:11f4? ([2a01:e0a:982:cbb0:58e3:6b80:c446:11f4]) by smtp.gmail.com with ESMTPSA id b3-20020adfe643000000b0033cffd1a302sm2352588wrn.57.2024.02.23.02.56.30 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 23 Feb 2024 02:56:31 -0800 (PST) Message-ID: Date: Fri, 23 Feb 2024 11:56:29 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Neil Armstrong Reply-To: neil.armstrong@linaro.org Subject: Re: [PATCH 1/6] drm/bridge: aux-hpd: fix OF node leaks Content-Language: en-US, fr To: Johan Hovold , Bjorn Andersson , Andrzej Hajda , Robert Foss , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Vinod Koul Cc: Jonas Karlman , Laurent Pinchart , Jernej Skrabec , Konrad Dybcio , Kishon Vijay Abraham I , Dmitry Baryshkov , Rob Clark , Abhinav Kumar , Kuogee Hsieh , freedreno@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org References: <20240217150228.5788-1-johan+linaro@kernel.org> <20240217150228.5788-2-johan+linaro@kernel.org> Autocrypt: addr=neil.armstrong@linaro.org; keydata= xsBNBE1ZBs8BCAD78xVLsXPwV/2qQx2FaO/7mhWL0Qodw8UcQJnkrWmgTFRobtTWxuRx8WWP GTjuhvbleoQ5Cxjr+v+1ARGCH46MxFP5DwauzPekwJUD5QKZlaw/bURTLmS2id5wWi3lqVH4 BVF2WzvGyyeV1o4RTCYDnZ9VLLylJ9bneEaIs/7cjCEbipGGFlfIML3sfqnIvMAxIMZrvcl9 qPV2k+KQ7q+aXavU5W+yLNn7QtXUB530Zlk/d2ETgzQ5FLYYnUDAaRl+8JUTjc0CNOTpCeik 80TZcE6f8M76Xa6yU8VcNko94Ck7iB4vj70q76P/J7kt98hklrr85/3NU3oti3nrIHmHABEB AAHNKk5laWwgQXJtc3Ryb25nIDxuZWlsLmFybXN0cm9uZ0B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vJeq7fUzbn/KdlhA8XPGzwGRy 4zcsPWvwnXgfe5tk680fEKZVwOZKIEuJC3v+/yZpQzDvGYJvbyix0lHnrCzq43WefRHI5XTT QbM0WUIBIcGmq38+OgUsMYu4NzLu7uZFAcmp6h8g Organization: Linaro Developer Services In-Reply-To: <20240217150228.5788-2-johan+linaro@kernel.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 17/02/2024 16:02, Johan Hovold wrote: > The two device node references taken during allocation need to be > dropped when the auxiliary device is freed. > > Fixes: 6914968a0b52 ("drm/bridge: properly refcount DT nodes in aux bridge drivers") > Cc: Dmitry Baryshkov > Cc: Neil Armstrong > Signed-off-by: Johan Hovold > --- > drivers/gpu/drm/bridge/aux-hpd-bridge.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/gpu/drm/bridge/aux-hpd-bridge.c b/drivers/gpu/drm/bridge/aux-hpd-bridge.c > index bb55f697a181..9e71daf95bde 100644 > --- a/drivers/gpu/drm/bridge/aux-hpd-bridge.c > +++ b/drivers/gpu/drm/bridge/aux-hpd-bridge.c > @@ -25,6 +25,7 @@ static void drm_aux_hpd_bridge_release(struct device *dev) > ida_free(&drm_aux_hpd_bridge_ida, adev->id); > > of_node_put(adev->dev.platform_data); > + of_node_put(adev->dev.of_node); > > kfree(adev); > } > @@ -74,6 +75,8 @@ struct device *drm_dp_hpd_bridge_register(struct device *parent, > > ret = auxiliary_device_init(adev); > if (ret) { > + of_node_put(adev->dev.platform_data); > + of_node_put(adev->dev.of_node); > ida_free(&drm_aux_hpd_bridge_ida, adev->id); > kfree(adev); > return ERR_PTR(ret); Reviewed-by: Neil Armstrong