lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250124073857.qwnl4ozccsictom5@thinkpad>
Date: Fri, 24 Jan 2025 13:08:57 +0530
From: Manivannan Sadhasivam <mani@...nel.org>
To: Tudor Ambarus <tudor.ambarus@...aro.org>,
	"@thinkpad"@web.codeaurora.org
Cc: Krzysztof Kozlowski <krzk@...nel.org>,
	Bjorn Andersson <andersson@...nel.org>,
	Konrad Dybcio <konradybcio@...nel.org>,
	Adrian Hunter <adrian.hunter@...el.com>,
	Ulf Hansson <ulf.hansson@...aro.org>,
	Abel Vesa <abel.vesa@...aro.org>,
	Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
	"James E.J. Bottomley" <James.Bottomley@...senPartnership.com>,
	"Martin K. Petersen" <martin.petersen@...cle.com>,
	Eric Biggers <ebiggers@...gle.com>, linux-arm-msm@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-mmc@...r.kernel.org,
	linux-scsi@...r.kernel.org, andre.draszik@...aro.org,
	peter.griffin@...aro.org, willmcvicker@...gle.com,
	kernel-team@...roid.com, stable@...r.kernel.org,
	Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Subject: Re: [PATCH v2 0/4] soc: qcom: ice: fix dev reference leaked through
 of_qcom_ice_get

On Fri, Jan 17, 2025 at 02:18:49PM +0000, Tudor Ambarus wrote:
> Hi!
> 
> Recently I've been pointed to this driver for an example on how consumers
> can get a pointer to the supplier's driver data and I noticed a leak.
> 
> Callers of of_qcom_ice_get() leak the device reference taken by
> of_find_device_by_node(). Introduce devm_of_qcom_ice_get().
> Exporting qcom_ice_put() is not done intentionally as the consumers need
> the ICE intance for the entire life of their device. Update the consumers
> to use the devm variant and make of_qcom_ice_get() static afterwards.
> 
> This set touches mmc and scsi subsystems. Since the fix is trivial for
> them, I'd suggest taking everything through the SoC tree with Acked-by
> tags if people consider this fine. Note that the mmc and scsi patches
> depend on the first patch that introduces devm_of_qcom_ice_get().
> 
> Thanks!
> 
> Signed-off-by: Tudor Ambarus <tudor.ambarus@...aro.org>

Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>

- Mani

> ---
> Changes in v2:
> - add kernel doc for newly introduced devm_of_qcom_ice_get().
> - update cover letter and commit message of first patch.
> - collect R-b and A-b tags.
> - Link to v1: https://lore.kernel.org/r/20250116-qcom-ice-fix-dev-leak-v1-0-84d937683790@linaro.org
> 
> ---
> Tudor Ambarus (4):
>       soc: qcom: ice: introduce devm_of_qcom_ice_get
>       mmc: sdhci-msm: fix dev reference leaked through of_qcom_ice_get
>       scsi: ufs: qcom: fix dev reference leaked through of_qcom_ice_get
>       soc: qcom: ice: make of_qcom_ice_get() static
> 
>  drivers/mmc/host/sdhci-msm.c |  2 +-
>  drivers/soc/qcom/ice.c       | 51 ++++++++++++++++++++++++++++++++++++++++++--
>  drivers/ufs/host/ufs-qcom.c  |  2 +-
>  include/soc/qcom/ice.h       |  3 ++-
>  4 files changed, 53 insertions(+), 5 deletions(-)
> ---
> base-commit: b323d8e7bc03d27dec646bfdccb7d1a92411f189
> change-id: 20250110-qcom-ice-fix-dev-leak-bbff59a964fb
> 
> Best regards,
> -- 
> Tudor Ambarus <tudor.ambarus@...aro.org>
> 

-- 
மணிவண்ணன் சதாசிவம்

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ