Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1526138
| From | Subhash Jadavani <subhashj@codeaurora.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] ufs: qcom: Properly clear hba priv on failure |
| Date | 2016-11-19 21:40 +0100 |
| Message-ID | <sFkAx-1jK-5@gated-at.bofh.it> (permalink) |
| References | <sEYql-3F7-11@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 2016-11-18 12:55, Bjorn Andersson wrote:
> In the case where we fail to acquire the phy the hba priv will be set
> already, so during cleanup ufs_qcom_setup_clocks() will dereference the
> now free, but still "valid looking" pointer "host".
host (ufs_qcom_host) was allocated with devm_kzalloc() so i am not sure
why it would be freed up before probe() returns failure.
> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
> ---
> drivers/scsi/ufs/ufs-qcom.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/ufs/ufs-qcom.c b/drivers/scsi/ufs/ufs-qcom.c
> index d345434b084f..7bd88ffee47a 100644
> --- a/drivers/scsi/ufs/ufs-qcom.c
> +++ b/drivers/scsi/ufs/ufs-qcom.c
> @@ -1197,7 +1197,7 @@ static int ufs_qcom_init(struct ufs_hba *hba)
> if (IS_ERR(host->generic_phy)) {
> err = PTR_ERR(host->generic_phy);
> dev_err(dev, "%s: PHY get failed %d\n", __func__, err);
> - goto out;
> + goto out_host_free;
> }
>
> err = ufs_qcom_bus_register(host);
--
The Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] ufs: qcom: Properly clear hba priv on failure Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-11-18 22:00 +0100
Re: [PATCH] ufs: qcom: Properly clear hba priv on failure Subhash Jadavani <subhashj@codeaurora.org> - 2016-11-19 21:40 +0100
Re: [PATCH] ufs: qcom: Properly clear hba priv on failure Bjorn Andersson <bjorn.andersson@linaro.org> - 2016-11-20 07:20 +0100
Re: [PATCH] ufs: qcom: Properly clear hba priv on failure Subhash Jadavani <subhashj@codeaurora.org> - 2016-11-21 19:40 +0100
csiph-web