From: "Carl Yin(殷张成)" <carl.yin@quectel.com>
To: "bbhatt@codeaurora.org" <bbhatt@codeaurora.org>
Cc: "manivannan.sadhasivam@linaro.org"
<manivannan.sadhasivam@linaro.org>,
"hemantk@codeaurora.org" <hemantk@codeaurora.org>,
"sfr@canb.auug.org.au" <sfr@canb.auug.org.au>,
"linux-arm-msm@vger.kernel.org" <linux-arm-msm@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Naveen Kumar" <naveen.kumar@quectel.com>
Subject: 答复: [PATCH] bus: mhi: core: Fix null pointer access
Date: Wed, 28 Oct 2020 02:03:48 +0000 [thread overview]
Message-ID: <HK2PR06MB3507360AE3E2D14FA9DE90C286170@HK2PR06MB3507.apcprd06.prod.outlook.com> (raw)
In-Reply-To: <b3bf32de1f3580210ebad6c4b2c7a802@codeaurora.org>
Hi bbhatt:
On Wednesday, October 28, 2020 9:02 AM, bbhatt wrote:
> Hi Carl,
>
> Yes this change is needed. Good catch. I ran in to this issue as well when a
> dev_err() call was made with a bad MHI configuration.
[carl.yin] yes, I also meet this error with a bad MHI configuration.
>
> Maybe you can explain a little more in the commit text subject?
>
> You could say, "Fix null pointer access when parsing MHI configuration"?
>
> On 2020-10-26 22:33, carl.yin@quectel.com wrote:
> > From: carl <carl.yin@quectel.com>
> >
> > function parse_ev_cfg and parse_ch_cfg access mhi_cntrl->mhi_dev
> Functions parse_ev_cfg() and parse_ch_cfg()
> > before it is set in function mhi_register_controller,
> mhi_register_controller()
> > use cntrl_dev to instead mhi_dev.
> use cntrl_dev instead of mhi_dev.
> >
> > Signed-off-by: carl <carl.yin@quectel.com>
> With these commit text updates,
[carl.yin] thank for words correction, for my mother language is not English,
there are lots of words wrong in the commit.
>
> Reviewed-by: Bhaumik Bhatt <bbhatt@codeaurora.org>
> > ---
> > drivers/bus/mhi/core/init.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/bus/mhi/core/init.c b/drivers/bus/mhi/core/init.c
> > index 0ffdebde8..c6b43e90b 100644
> > --- a/drivers/bus/mhi/core/init.c
> > +++ b/drivers/bus/mhi/core/init.c
> > @@ -610,7 +610,7 @@ static int parse_ev_cfg(struct mhi_controller
> > *mhi_cntrl, {
> > struct mhi_event *mhi_event;
> > const struct mhi_event_config *event_cfg;
> > - struct device *dev = &mhi_cntrl->mhi_dev->dev;
> > + struct device *dev = mhi_cntrl->cntrl_dev;
> > int i, num;
> >
> > num = config->num_events;
> > @@ -692,7 +692,7 @@ static int parse_ch_cfg(struct mhi_controller
> > *mhi_cntrl,
> > const struct mhi_controller_config *config) {
> > const struct mhi_channel_config *ch_cfg;
> > - struct device *dev = &mhi_cntrl->mhi_dev->dev;
> > + struct device *dev = mhi_cntrl->cntrl_dev;
> > int i;
> > u32 chan;
>
> --
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a
> Linux Foundation Collaborative Project
next parent reply other threads:[~2020-10-28 21:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <41058752035efde392e1c55d0fd5b58c@sslemail.net>
[not found] ` <b3bf32de1f3580210ebad6c4b2c7a802@codeaurora.org>
2020-10-28 2:03 ` Carl Yin(殷张成) [this message]
2020-10-28 20:00 ` 答复: [PATCH] bus: mhi: core: Fix null pointer access Bhaumik Bhatt
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=HK2PR06MB3507360AE3E2D14FA9DE90C286170@HK2PR06MB3507.apcprd06.prod.outlook.com \
--to=carl.yin@quectel.com \
--cc=bbhatt@codeaurora.org \
--cc=hemantk@codeaurora.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=manivannan.sadhasivam@linaro.org \
--cc=naveen.kumar@quectel.com \
--cc=sfr@canb.auug.org.au \
/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;
as well as URLs for NNTP newsgroup(s).