mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] mei: Add error logging in IRQ handler to prevent silent failures
@ 2025-02-20 13:34 Wentao Liang
  2025-02-20 14:16 ` Greg KH
  0 siblings, 1 reply; 2+ messages in thread
From: Wentao Liang @ 2025-02-20 13:34 UTC (permalink / raw)
  To: alexander.usyskin, arnd, gregkh; +Cc: linux-kernel, Wentao Liang, stable

Log mei_irq_write_handler() errors to prevent silent IRQ handling failures.

Fixes: 962ff7bcec24 ("mei: replace callback structures used as list head by list_head")
Cc: stable@vger.kernel.org # 4.11+
Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
---
 drivers/misc/mei/hw-me.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/misc/mei/hw-me.c b/drivers/misc/mei/hw-me.c
index d11a0740b47c..5df42a64b4db 100644
--- a/drivers/misc/mei/hw-me.c
+++ b/drivers/misc/mei/hw-me.c
@@ -1415,6 +1415,8 @@ irqreturn_t mei_me_irq_thread_handler(int irq, void *dev_id)
 	if (dev->pg_event != MEI_PG_EVENT_WAIT &&
 	    dev->pg_event != MEI_PG_EVENT_RECEIVED) {
 		rets = mei_irq_write_handler(dev, &cmpl_list);
+		if (rets)
+			dev_err(dev->dev, "mei_irq_write_handler ret = %d.\n", rets);
 		dev->hbuf_is_ready = mei_hbuf_is_ready(dev);
 	}
 
-- 
2.42.0.windows.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] mei: Add error logging in IRQ handler to prevent silent failures
  2025-02-20 13:34 [PATCH] mei: Add error logging in IRQ handler to prevent silent failures Wentao Liang
@ 2025-02-20 14:16 ` Greg KH
  0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2025-02-20 14:16 UTC (permalink / raw)
  To: Wentao Liang; +Cc: alexander.usyskin, arnd, linux-kernel, stable

On Thu, Feb 20, 2025 at 09:34:35PM +0800, Wentao Liang wrote:
> Log mei_irq_write_handler() errors to prevent silent IRQ handling failures.
> 
> Fixes: 962ff7bcec24 ("mei: replace callback structures used as list head by list_head")
> Cc: stable@vger.kernel.org # 4.11+
> Signed-off-by: Wentao Liang <vulab@iscas.ac.cn>
> ---
>  drivers/misc/mei/hw-me.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/misc/mei/hw-me.c b/drivers/misc/mei/hw-me.c
> index d11a0740b47c..5df42a64b4db 100644
> --- a/drivers/misc/mei/hw-me.c
> +++ b/drivers/misc/mei/hw-me.c
> @@ -1415,6 +1415,8 @@ irqreturn_t mei_me_irq_thread_handler(int irq, void *dev_id)
>  	if (dev->pg_event != MEI_PG_EVENT_WAIT &&
>  	    dev->pg_event != MEI_PG_EVENT_RECEIVED) {
>  		rets = mei_irq_write_handler(dev, &cmpl_list);
> +		if (rets)
> +			dev_err(dev->dev, "mei_irq_write_handler ret = %d.\n", rets);
>  		dev->hbuf_is_ready = mei_hbuf_is_ready(dev);
>  	}
>  
> -- 
> 2.42.0.windows.2
> 

How was this found and tested?

And why print an error message in an irq handler, isn't that going to be
messy?  What can the user do with this message?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-02-20 14:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-02-20 13:34 [PATCH] mei: Add error logging in IRQ handler to prevent silent failures Wentao Liang
2025-02-20 14:16 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®