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-next>] [day] [month] [year] [list]
Message-ID: <HK2PR06MB3507360AE3E2D14FA9DE90C286170@HK2PR06MB3507.apcprd06.prod.outlook.com>
Date:   Wed, 28 Oct 2020 02:03:48 +0000
From:   Carl Yin(殷张成) <carl.yin@...ctel.com>
To:     "bbhatt@...eaurora.org" <bbhatt@...eaurora.org>
CC:     "manivannan.sadhasivam@...aro.org" <manivannan.sadhasivam@...aro.org>,
        "hemantk@...eaurora.org" <hemantk@...eaurora.org>,
        "sfr@...b.auug.org.au" <sfr@...b.auug.org.au>,
        "linux-arm-msm@...r.kernel.org" <linux-arm-msm@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Naveen Kumar" <naveen.kumar@...ctel.com>
Subject: 答复: [PATCH] bus: mhi: core: Fix null pointer access

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@...ctel.com wrote:
> > From: carl <carl.yin@...ctel.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@...ctel.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@...eaurora.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ