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 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 09467CCD184 for ; Mon, 6 Oct 2025 20:39:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id E6C9610E46A; Mon, 6 Oct 2025 20:39:03 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="bfFJxe4m"; dkim-atps=neutral Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8F38810E466; Mon, 6 Oct 2025 20:39:02 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by sea.source.kernel.org (Postfix) with ESMTP id 451C9440CA; Mon, 6 Oct 2025 20:39:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 438CEC4CEF5; Mon, 6 Oct 2025 20:39:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1759783142; bh=1F3yR8HVkURa8WwisEPfn7+RUwEt2ebKWI3pRZ5T+jU=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=bfFJxe4mu4iYY9tJpNihCb5imFngU0VWbkIBwccbaAym15CAP7WKw6wDFRv8AZbi1 NGFtw+wLB+yDIdUQb0vZJZIncxwdElVH+t+n7MLuH3u4j/jyA1EOOsJE6M/A5SgGPg F+ttGB83uYrDkbag3M1lgC2Hbwc2fstoipQVhGAVl/RB6zPFBdKCEfaVj8zk2AMhLJ wmSrQ7pNdeYJY98LMxvXvAPGozYmK/G7vdr968PDp33HddO+ksWCkmxxZPJ/UqKnuO aYD1Ar4iJrgxMZC9n7Up7Aw/2KMmQcfqFTAj6ssIBS9W9xCcs4UgJGBsQWQQFXfsqM gpS6XziN4LOVA== Message-ID: Date: Mon, 6 Oct 2025 22:38:59 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] drm/nouveau: Fix refcount leak in nouveau_connector_detect To: Shuhao Fu Cc: Lyude Paul , dri-devel@lists.freedesktop.org, nouveau@lists.freedesktop.org References: From: Danilo Krummrich Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On 10/6/25 6:48 PM, Shuhao Fu wrote: > A possible inconsistent refcount update has been identified in function > `nouveau_connector_detect`, which may cause a resource leak. > > After calling `pm_runtime_get_*(dev->dev)`, the usage counter of `dev->dev` > gets increased. In case function `nvif_outp_edid_get` returns negative, > function `nouveau_connector_detect` returns without decreasing the usage > counter of `dev->dev`, causing a refcount inconsistency. > > Signed-off-by: Shuhao Fu > Closes: https://gitlab.freedesktop.org/drm/nouveau/-/issues/450 Can you please add a corresponding Fixes: tag and Cc: the stable list?