From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0DC4828A3FA for ; Mon, 16 Feb 2026 09:09:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.13 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771233001; cv=none; b=b2B136+CQvj6a99AaXAtg6cmLy8XDo9SyyKEUnqC7qAA9TI8hD60o4Om+jKcFHtk1OGRs9Ta4Y3owm0vlGSl8J06PjncNrMd9t+V+FIbDbN3vaYBx29mY3PoiN3ctzaJIjsN1Jvg4W96U1+/SH39mzjX7dPLktr73Bnz3USAaRQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771233001; c=relaxed/simple; bh=78cpmt3Lmpk6tPnuo7Dp/XCuOAGU0Q/jR/mNyF9FiOw=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=M3cQBGUm13w4xp/02VfHqmQRuj08P61iYSx+RJuu9sIJenKmNTAgRZI9beKo81lCXA134Spgchm1wJqKvroZ+vSb0CMAFhmVTvOivA7BRX9puPuNNkLJuX/QEgbtVOK7Xw/SWomyqvi4fJRCWIxA78p1tvi8bVszzlvyVVPDd9Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=XSghdTY1; arc=none smtp.client-ip=198.175.65.13 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="XSghdTY1" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1771233000; x=1802769000; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=78cpmt3Lmpk6tPnuo7Dp/XCuOAGU0Q/jR/mNyF9FiOw=; b=XSghdTY1x7A1k21WixW/vlt2E4LTQowImNy4sB7EvdCI/uGC7Y6NSN9M I7otRL3YeAdELPQu1L50a4te0Z5SQCwhwnGRInACOnk6wsUJQjjuyKwFT iNWD1Mzu1wJleUUDNyA42fak6VaL6mX4kY+jvQJJzoasvjfbiV3L0SZWA c1DrOKNzX5Brb7AFT2vjbpTKfkQvhdOu0TVXxenznBu1pg3KdWjMvvzfn 3gufqVi8w8xN/pJapaOUx4Tv3ZJSpfYezJoF+SK+lkcbN1+S5iyoPAOC/ 86x5FVtY80bT9PpRHoXt0k5EMkfqByy677Mt/C299zark4N0a4QEar5Uc A==; X-CSE-ConnectionGUID: UKk6lCwWRVWqAbzIYzBCBQ== X-CSE-MsgGUID: tmSKiX4OQVOwfxH9dId7VQ== X-IronPort-AV: E=McAfee;i="6800,10657,11702"; a="83409554" X-IronPort-AV: E=Sophos;i="6.21,293,1763452800"; d="scan'208";a="83409554" Received: from orviesa006.jf.intel.com ([10.64.159.146]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2026 01:09:59 -0800 X-CSE-ConnectionGUID: cuS7oahjRYGa4KmstfXG1Q== X-CSE-MsgGUID: gS5nqPSUT7K0Mi78kkyQag== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.21,293,1763452800"; d="scan'208";a="212646537" Received: from abityuts-desk.ger.corp.intel.com (HELO localhost) ([10.245.244.188]) by orviesa006-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Feb 2026 01:09:58 -0800 Date: Mon, 16 Feb 2026 11:09:55 +0200 From: Andy Shevchenko To: Vladimir Oltean Cc: Haotian Zhang , vkoul@kernel.org, kishon@kernel.org, linux-phy@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] phy: hisilicon: Fix OF node reference leak Message-ID: References: <20251112062246.852-1-vulab@iscas.ac.cn> <20260216084348.e2ozdqy5unvfs7qe@skbuf> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260216084348.e2ozdqy5unvfs7qe@skbuf> Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo On Mon, Feb 16, 2026 at 10:43:48AM +0200, Vladimir Oltean wrote: > On Wed, Nov 12, 2025 at 02:22:46PM +0800, Haotian Zhang wrote: ... > pcie_dev = bus_find_device_by_of_node(&platform_bus_type, pcie_port); > + of_node_put(pcie_port); > if (!pcie_dev) { > dev_err(dev, "Didn't find pcie device\n"); > return -ENODEV; > } > > Note that there exists a second reference leak bug in the same function. > bus_find_device_by_of_node() requires put_device(pcie_dev) Note, there is a pci_* wrapper for that. > after it is no longer needed. Is it only a local variable? If so, it's probably okay to put it, but that action needs more investigations of the how the pcie_dev is being used. Also, it might be (but I don't think it is) a (double) put_device() call somewhere else. TL;DR: the summary of this investigation should be present in the commit message. -- With Best Regards, Andy Shevchenko