mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Sean Young <sean@mess.org>
To: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
	linux-media@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] media: imon: ratelimit usb_rx_callback_intf{0,1} error messages
Date: Thu, 10 Jul 2025 20:58:54 +0100	[thread overview]
Message-ID: <aHAbfmpBWzVVT1r8@gofer.mess.org> (raw)
In-Reply-To: <56c16d80-57d0-4873-98c8-03e37edbbbdf@I-love.SAKURA.ne.jp>

Hello Tetsuo,

Thank you for submitting your patch.

On Thu, Jul 10, 2025 at 10:43:56AM +0900, Tetsuo Handa wrote:
> Ratelimiting flood of
> 
>   imon 1-1:0.0: imon usb_rx_callback_intf0: status(-71): ignored
> 
> message helps reducing possibility of hitting
> 
>   rcu: INFO: rcu_preempt self-detected stall on CPU
>   rcu: 	0-....: (10485 ticks this GP) idle=ff54/1/0x4000000000000000 softirq=53201/53201 fqs=5246
>   rcu: 	         hardirqs   softirqs   csw/system
>   rcu: 	 number:     6548       7856            0
>   rcu: 	cputime:        0        739        51598   ==> 52490(ms)
>   rcu: 	(t=10500 jiffies g=34137 q=35661 ncpus=2)
>   CPU: 0 UID: 0 PID: 6858 Comm: kworker/0:4 Not tainted 6.16.0-rc4-syzkaller-00300-g81c3b7256f9e #0 PREEMPT(voluntary)
>   Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 05/07/2025
>   Workqueue: usb_hub_wq hub_event
>   RIP: 0010:console_flush_all+0x9a2/0xc60 kernel/printk/printk.c:3227
> 
> messages.
> 
> Link: https://syzkaller.appspot.com/bug?extid=592e2ab8775dbe0bf09a
> Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
> ---
>  drivers/media/rc/imon.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/media/rc/imon.c b/drivers/media/rc/imon.c
> index f5221b018808..10124a26ffde 100644
> --- a/drivers/media/rc/imon.c
> +++ b/drivers/media/rc/imon.c
> @@ -1765,7 +1765,7 @@ static void usb_rx_callback_intf0(struct urb *urb)
>  		break;
>  
>  	default:
> -		dev_warn(ictx->dev, "imon %s: status(%d): ignored\n",
> +		dev_warn_ratelimited(ictx->dev, "imon %s: status(%d): ignored\n",

>  			 __func__, urb->status);

I'm not sure this is the right way to go about this. When the usb callback
receives urb status -71 (-EPROTO, i.e. protocol error or unplug), then there
is no use in continuing to resubmit the urb; you will only get more failures
like you are seeing here.

So I think for -EPROTO, simply return and do not resubmit the urb. TBH
I am not sure if usb_unlink_urb() is required in this case, that needs
investigation.

>  		break;
>  	}
> @@ -1806,7 +1806,7 @@ static void usb_rx_callback_intf1(struct urb *urb)
>  		break;
>  
>  	default:
> -		dev_warn(ictx->dev, "imon %s: status(%d): ignored\n",
> +		dev_warn_ratelimited(ictx->dev, "imon %s: status(%d): ignored\n",
>  			 __func__, urb->status);

Same here.

>  		break;
>  	}
> -- 
> 2.47.1
> 

      reply	other threads:[~2025-07-10 19:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-10  1:43 Tetsuo Handa
2025-07-10 19:58 ` Sean Young [this message]

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=aHAbfmpBWzVVT1r8@gofer.mess.org \
    --to=sean@mess.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    /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

all inboxes | Powered by JetHome®