From: Manivannan Sadhasivam <mani@kernel.org>
To: Tudor Ambarus <tudor.ambarus@linaro.org>, \@thinkpad
Cc: Krzysztof Kozlowski <krzk@kernel.org>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Ulf Hansson <ulf.hansson@linaro.org>,
Abel Vesa <abel.vesa@linaro.org>,
Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>,
"James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Eric Biggers <ebiggers@google.com>,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-mmc@vger.kernel.org, linux-scsi@vger.kernel.org,
andre.draszik@linaro.org, peter.griffin@linaro.org,
willmcvicker@google.com, kernel-team@android.com,
stable@vger.kernel.org,
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Subject: Re: [PATCH v2 0/4] soc: qcom: ice: fix dev reference leaked through of_qcom_ice_get
Date: Fri, 24 Jan 2025 13:08:57 +0530 [thread overview]
Message-ID: <20250124073857.qwnl4ozccsictom5@thinkpad> (raw)
In-Reply-To: <20250117-qcom-ice-fix-dev-leak-v2-0-1ffa5b6884cb@linaro.org>
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@linaro.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.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@linaro.org>
>
--
மணிவண்ணன் சதாசிவம்
next prev parent reply other threads:[~2025-01-24 7:39 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-17 14:18 [PATCH v2 0/4] soc: qcom: ice: fix dev reference leaked through of_qcom_ice_get Tudor Ambarus
2025-01-17 14:18 ` [PATCH v2 1/4] soc: qcom: ice: introduce devm_of_qcom_ice_get Tudor Ambarus
2025-01-18 13:31 ` Krzysztof Kozlowski
2025-01-19 16:57 ` Abel Vesa
2025-01-17 14:18 ` [PATCH v2 2/4] mmc: sdhci-msm: fix dev reference leaked through of_qcom_ice_get Tudor Ambarus
2025-01-19 16:59 ` Abel Vesa
2025-01-17 14:18 ` [PATCH v2 3/4] scsi: ufs: qcom: " Tudor Ambarus
2025-01-19 16:59 ` Abel Vesa
2025-02-03 21:43 ` Martin K. Petersen
2025-01-17 14:18 ` [PATCH v2 4/4] soc: qcom: ice: make of_qcom_ice_get() static Tudor Ambarus
2025-01-19 16:58 ` Abel Vesa
2025-01-24 7:38 ` Manivannan Sadhasivam [this message]
2025-02-14 22:38 ` [PATCH v2 0/4] soc: qcom: ice: fix dev reference leaked through of_qcom_ice_get Bjorn Andersson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250124073857.qwnl4ozccsictom5@thinkpad \
--to=mani@kernel.org \
--cc=James.Bottomley@HansenPartnership.com \
--cc=abel.vesa@linaro.org \
--cc=adrian.hunter@intel.com \
--cc=andersson@kernel.org \
--cc=andre.draszik@linaro.org \
--cc=ebiggers@google.com \
--cc=kernel-team@android.com \
--cc=konradybcio@kernel.org \
--cc=krzk@kernel.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=martin.petersen@oracle.com \
--cc=peter.griffin@linaro.org \
--cc=stable@vger.kernel.org \
--cc=tudor.ambarus@linaro.org \
--cc=ulf.hansson@linaro.org \
--cc=willmcvicker@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox