From: Subhash Jadavani <subhashj@codeaurora.org>
To: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Vinayak Holikatti <vinholikatti@gmail.com>,
"James E.J. Bottomley" <jejb@linux.vnet.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
Yaniv Gardi <ygardi@codeaurora.org>,
Vivek Gautam <vivek.gautam@codeaurora.org>,
linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org, linux-scsi-owner@vger.kernel.org
Subject: Re: [PATCH] ufs: qcom: Properly clear hba priv on failure
Date: Sat, 19 Nov 2016 12:30:24 -0800 [thread overview]
Message-ID: <99d75f263b7b973ddbe5031d8500048c@codeaurora.org> (raw)
In-Reply-To: <1479502542-1136-1-git-send-email-bjorn.andersson@linaro.org>
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
next prev parent reply other threads:[~2016-11-19 20:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-18 20:55 [PATCH] ufs: qcom: Properly clear hba priv on failure Bjorn Andersson
2016-11-19 20:30 ` Subhash Jadavani [this message]
2016-11-20 6:15 ` Bjorn Andersson
2016-11-21 18:32 ` Subhash Jadavani
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=99d75f263b7b973ddbe5031d8500048c@codeaurora.org \
--to=subhashj@codeaurora.org \
--cc=bjorn.andersson@linaro.org \
--cc=jejb@linux.vnet.ibm.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi-owner@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=vinholikatti@gmail.com \
--cc=vivek.gautam@codeaurora.org \
--cc=ygardi@codeaurora.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.