* [PATCH v3] Fix potential kernel panic by calling dev_err
@ 2025-09-04 18:34 Adam Xue
2025-09-05 5:44 ` Krishna Chaitanya Chundru
2025-09-05 16:45 ` Manivannan Sadhasivam
0 siblings, 2 replies; 5+ messages in thread
From: Adam Xue @ 2025-09-04 18:34 UTC (permalink / raw)
To: mani, jeff.hugo, quic_yabdulra, chentao, quic_mattleun,
krishna.chundru, mhi, linux-arm-msm, linux-kernel
Cc: zxue, imocanu
In mhi_init_irq_setup, the device pointer used for dev_err was not initialized.
Use the pointer from mhi_cntrl instead.
Signed-off-by: Adam Xue <zxue@semtech.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.
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH v3] Fix potential kernel panic by calling dev_err
2025-09-04 18:34 [PATCH v3] Fix potential kernel panic by calling dev_err Adam Xue
@ 2025-09-05 5:44 ` Krishna Chaitanya Chundru
2025-09-05 16:45 ` Manivannan Sadhasivam
1 sibling, 0 replies; 5+ messages in thread
From: Krishna Chaitanya Chundru @ 2025-09-05 5:44 UTC (permalink / raw)
To: Adam Xue, mani, jeff.hugo, quic_yabdulra, chentao, quic_mattleun,
mhi, linux-arm-msm, linux-kernel
Cc: imocanu
On 9/5/2025 12:04 AM, Adam Xue wrote:
> In mhi_init_irq_setup, the device pointer used for dev_err was not initialized.
> Use the pointer from mhi_cntrl instead.
>
Don't we need fixes tag.
> Signed-off-by: Adam Xue <zxue@semtech.com>
Reviewed-by: Krishna Chaitanya Chundru <krishna.chundru@oss.qualcomm.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;
> }
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH v3] Fix potential kernel panic by calling dev_err
2025-09-04 18:34 [PATCH v3] Fix potential kernel panic by calling dev_err Adam Xue
2025-09-05 5:44 ` Krishna Chaitanya Chundru
@ 2025-09-05 16:45 ` Manivannan Sadhasivam
2025-09-05 17:19 ` Adam Xue
1 sibling, 1 reply; 5+ messages in thread
From: Manivannan Sadhasivam @ 2025-09-05 16:45 UTC (permalink / raw)
To: Adam Xue
Cc: jeff.hugo, quic_yabdulra, chentao, quic_mattleun, krishna.chundru,
mhi, linux-arm-msm, linux-kernel, imocanu
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@semtech.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.
--
மணிவண்ணன் சதாசிவம்
^ permalink raw reply [flat|nested] 5+ messages in thread* RE: [PATCH v3] Fix potential kernel panic by calling dev_err
2025-09-05 16:45 ` Manivannan Sadhasivam
@ 2025-09-05 17:19 ` Adam Xue
2025-09-05 17:30 ` Manivannan Sadhasivam
0 siblings, 1 reply; 5+ messages in thread
From: Adam Xue @ 2025-09-05 17:19 UTC (permalink / raw)
To: Manivannan Sadhasivam
Cc: jeff.hugo@oss.qualcomm.com, quic_yabdulra@quicinc.com,
chentao@kylinos.cn, quic_mattleun@quicinc.com,
krishna.chundru@oss.qualcomm.com, mhi@lists.linux.dev,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
Iulian Mocanu
Hi Mani,
Thanks for reviewing the patch. I am still learning the patch submission process.
I got the email addresses from ./scripts/get_maintainer.pl. Where may I get the stable list?
Regards,
Adam
-----Original Message-----
From: Manivannan Sadhasivam <mani@kernel.org>
Sent: September 5, 2025 9:45 AM
To: Adam Xue <zxue@semtech.com>
Cc: jeff.hugo@oss.qualcomm.com; quic_yabdulra@quicinc.com; chentao@kylinos.cn; quic_mattleun@quicinc.com; krishna.chundru@oss.qualcomm.com; mhi@lists.linux.dev; linux-arm-msm@vger.kernel.org; linux-kernel@vger.kernel.org; Iulian Mocanu <imocanu@semtech.com>
Subject: Re: [PATCH v3] Fix potential kernel panic by calling dev_err
Caution: This email originated outside of Semtech.
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@semtech.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.
--
மணிவண்ணன் சதாசிவம்
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.
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH v3] Fix potential kernel panic by calling dev_err
2025-09-05 17:19 ` Adam Xue
@ 2025-09-05 17:30 ` Manivannan Sadhasivam
0 siblings, 0 replies; 5+ messages in thread
From: Manivannan Sadhasivam @ 2025-09-05 17:30 UTC (permalink / raw)
To: Adam Xue
Cc: jeff.hugo@oss.qualcomm.com, quic_yabdulra@quicinc.com,
chentao@kylinos.cn, quic_mattleun@quicinc.com,
krishna.chundru@oss.qualcomm.com, mhi@lists.linux.dev,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
Iulian Mocanu
On Fri, Sep 05, 2025 at 05:19:04PM GMT, Adam Xue wrote:
> Hi Mani,
>
> Thanks for reviewing the patch. I am still learning the patch submission process.
> I got the email addresses from ./scripts/get_maintainer.pl. Where may I get the stable list?
>
Refer the past commits:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drivers/bus/mhi?id=5bd398e20f0833ae8a1267d4f343591a2dd20185
For bug fixes that needs to be backported to stable kernels, you need to
specify the below tag:
Cc: stable@vger.kernel.org
- Mani
> Regards,
>
> Adam
>
> -----Original Message-----
> From: Manivannan Sadhasivam <mani@kernel.org>
> Sent: September 5, 2025 9:45 AM
> To: Adam Xue <zxue@semtech.com>
> Cc: jeff.hugo@oss.qualcomm.com; quic_yabdulra@quicinc.com; chentao@kylinos.cn; quic_mattleun@quicinc.com; krishna.chundru@oss.qualcomm.com; mhi@lists.linux.dev; linux-arm-msm@vger.kernel.org; linux-kernel@vger.kernel.org; Iulian Mocanu <imocanu@semtech.com>
> Subject: Re: [PATCH v3] Fix potential kernel panic by calling dev_err
>
> Caution: This email originated outside of Semtech.
>
>
> 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@semtech.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.
>
> --
> மணிவண்ணன் சதாசிவம்
>
> 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.
--
மணிவண்ணன் சதாசிவம்
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2025-09-05 17:30 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-04 18:34 [PATCH v3] Fix potential kernel panic by calling dev_err Adam Xue
2025-09-05 5:44 ` Krishna Chaitanya Chundru
2025-09-05 16:45 ` Manivannan Sadhasivam
2025-09-05 17:19 ` Adam Xue
2025-09-05 17:30 ` Manivannan Sadhasivam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox