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-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6lge6p5e3ulcy5pbencvhjfhcwrfsptvclxyu53z3t7anwyrj6@bxbidmvaiql5>
Date: Fri, 5 Sep 2025 22:15:28 +0530
From: Manivannan Sadhasivam <mani@...nel.org>
To: Adam Xue <zxue@...tech.com>
Cc: jeff.hugo@....qualcomm.com, quic_yabdulra@...cinc.com, 
	chentao@...inos.cn, quic_mattleun@...cinc.com, krishna.chundru@....qualcomm.com, 
	mhi@...ts.linux.dev, linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org, 
	imocanu@...tech.com
Subject: Re: [PATCH v3] Fix potential kernel panic by calling dev_err

On Thu, Sep 04, 2025 at 11:34:05AM GMT, Adam Xue wrote:

Missing subject prefix:

	bus: mhi: host:

> In mhi_init_irq_setup, the device pointer used for dev_err was not initialized.
>  Use the pointer from mhi_cntrl instead.
> 

You need to add relevant fixes tag and CC stable list. Below tags are valid for
this fix:

Fixes: b0fc0167f254 ("bus: mhi: core: Allow shared IRQ for event rings")
Fixes: 3000f85b8f47 ("bus: mhi: core: Add support for basic PM operations")

- Mani

> Signed-off-by: Adam Xue <zxue@...tech.com>
> ---
>  drivers/bus/mhi/host/init.c | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/bus/mhi/host/init.c b/drivers/bus/mhi/host/init.c
> index 7f72aab38ce9..099be8dd1900 100644
> --- a/drivers/bus/mhi/host/init.c
> +++ b/drivers/bus/mhi/host/init.c
> @@ -194,7 +194,6 @@ static void mhi_deinit_free_irq(struct mhi_controller *mhi_cntrl)
>  static int mhi_init_irq_setup(struct mhi_controller *mhi_cntrl)
>  {
>  	struct mhi_event *mhi_event = mhi_cntrl->mhi_event;
> -	struct device *dev = &mhi_cntrl->mhi_dev->dev;
>  	unsigned long irq_flags = IRQF_SHARED | IRQF_NO_SUSPEND;
>  	int i, ret;
>  
> @@ -221,7 +220,7 @@ static int mhi_init_irq_setup(struct mhi_controller *mhi_cntrl)
>  			continue;
>  
>  		if (mhi_event->irq >= mhi_cntrl->nr_irqs) {
> -			dev_err(dev, "irq %d not available for event ring\n",
> +			dev_err(mhi_cntrl->cntrl_dev, "irq %d not available for event ring\n",
>  				mhi_event->irq);
>  			ret = -EINVAL;
>  			goto error_request;
> @@ -232,7 +231,7 @@ static int mhi_init_irq_setup(struct mhi_controller *mhi_cntrl)
>  				  irq_flags,
>  				  "mhi", mhi_event);
>  		if (ret) {
> -			dev_err(dev, "Error requesting irq:%d for ev:%d\n",
> +			dev_err(mhi_cntrl->cntrl_dev, "Error requesting irq:%d for ev:%d\n",
>  				mhi_cntrl->irq[mhi_event->irq], i);
>  			goto error_request;
>  		}
> -- 
> 2.43.0
> 
> 
> To view our privacy policy, including the types of personal information we collect, process and share, and the rights and options you have in this respect, see www.semtech.com/legal.

-- 
மணிவண்ணன் சதாசிவம்

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ