All of lore.kernel.org
 help / color / mirror / Atom feed
From: syzbot <syzbot+c793a7eca38803212c61@syzkaller.appspotmail.com>
To: linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com
Subject: Re: [syzbot] Re: [syzbot] [usb?] INFO: rcu detected stall in schedule_timeout (6)
Date: Tue, 25 Jun 2024 03:24:10 -0700	[thread overview]
Message-ID: <00000000000067a8dc061bb44c10@google.com> (raw)
In-Reply-To: <000000000000051b2d06189716c3@google.com>

For archival purposes, forwarding an incoming command email to
linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com.

***

Subject: Re: [syzbot] [usb?] INFO: rcu detected stall in schedule_timeout (6)
Author: marcello.bauer@9elements.com

#syz test

--- a/drivers/usb/gadget/udc/dummy_hcd.c
+++ b/drivers/usb/gadget/udc/dummy_hcd.c
@@ -1304,7 +1304,7 @@ static int dummy_urb_enqueue(
 
        /* kick the scheduler, it'll do the rest */
        if (!hrtimer_active(&dum_hcd->timer))
-               hrtimer_start(&dum_hcd->timer,
ns_to_ktime(DUMMY_TIMER_INT_NSECS), HRTIMER_MODE_REL);
+               hrtimer_start(&dum_hcd->timer,
ns_to_ktime(DUMMY_TIMER_INT_NSECS), HRTIMER_MODE_REL_SOFT);
 
  done:
        spin_unlock_irqrestore(&dum_hcd->dum->lock, flags);
@@ -1325,7 +1325,7 @@ static int dummy_urb_dequeue(struct usb_hcd *hcd,
struct urb *urb, int status)
        rc = usb_hcd_check_unlink_urb(hcd, urb, status);
        if (!rc && dum_hcd->rh_state != DUMMY_RH_RUNNING &&
                        !list_empty(&dum_hcd->urbp_list))
-               hrtimer_start(&dum_hcd->timer, ns_to_ktime(0),
HRTIMER_MODE_REL);
+               hrtimer_start(&dum_hcd->timer, ns_to_ktime(0),
HRTIMER_MODE_REL_SOFT);
 
        spin_unlock_irqrestore(&dum_hcd->dum->lock, flags);
        return rc;
@@ -1995,7 +1995,7 @@ static enum hrtimer_restart dummy_timer(struct
hrtimer *t)
                dum_hcd->udev = NULL;
        } else if (dum_hcd->rh_state == DUMMY_RH_RUNNING) {
                /* want a 1 msec delay here */
-               hrtimer_start(&dum_hcd->timer,
ns_to_ktime(DUMMY_TIMER_INT_NSECS), HRTIMER_MODE_REL);
+               hrtimer_start(&dum_hcd->timer,
ns_to_ktime(DUMMY_TIMER_INT_NSECS), HRTIMER_MODE_REL_SOFT);
        }
 
        spin_unlock_irqrestore(&dum->lock, flags);
@@ -2389,7 +2389,7 @@ static int dummy_bus_resume(struct usb_hcd *hcd)
                dum_hcd->rh_state = DUMMY_RH_RUNNING;
                set_link_state(dum_hcd);
                if (!list_empty(&dum_hcd->urbp_list))
-                       hrtimer_start(&dum_hcd->timer, ns_to_ktime(0),
HRTIMER_MODE_REL);
+                       hrtimer_start(&dum_hcd->timer, ns_to_ktime(0),
HRTIMER_MODE_REL_SOFT);
                hcd->state = HC_STATE_RUNNING;
        }
        spin_unlock_irq(&dum_hcd->dum->lock);
@@ -2467,7 +2467,7 @@ static DEVICE_ATTR_RO(urbs);
 
 static int dummy_start_ss(struct dummy_hcd *dum_hcd)
 {
-       hrtimer_init(&dum_hcd->timer, CLOCK_MONOTONIC,
HRTIMER_MODE_REL);
+       hrtimer_init(&dum_hcd->timer, CLOCK_MONOTONIC,
HRTIMER_MODE_REL_SOFT);
        dum_hcd->timer.function = dummy_timer;
        dum_hcd->rh_state = DUMMY_RH_RUNNING;
        dum_hcd->stream_en_ep = 0;
@@ -2497,7 +2497,7 @@ static int dummy_start(struct usb_hcd *hcd)
                return dummy_start_ss(dum_hcd);
 
        spin_lock_init(&dum_hcd->dum->lock);
-       hrtimer_init(&dum_hcd->timer, CLOCK_MONOTONIC,
HRTIMER_MODE_REL);
+       hrtimer_init(&dum_hcd->timer, CLOCK_MONOTONIC,
HRTIMER_MODE_REL_SOFT);
        dum_hcd->timer.function = dummy_timer;
        dum_hcd->rh_state = DUMMY_RH_RUNNING;

On Thu, 2024-05-16 at 15:01 -0700, syzbot wrote:
> syzbot has bisected this issue to:
> 
> commit a7f3813e589fd8e2834720829a47b5eb914a9afe
> Author: Marcello Sylvester Bauer <sylv@sylv.io>
> Date:   Thu Apr 11 14:51:28 2024 +0000
> 
>     usb: gadget: dummy_hcd: Switch to hrtimer transfer scheduler
> 
> bisection log: 
> https://syzkaller.appspot.com/x/bisect.txt?x=119318d0980000
> start commit:   75fa778d74b7 Add linux-next specific files for
> 20240510
> git tree:       linux-next
> final oops:    
> https://syzkaller.appspot.com/x/report.txt?x=139318d0980000
> console output:
> https://syzkaller.appspot.com/x/log.txt?x=159318d0980000
> kernel config: 
> https://syzkaller.appspot.com/x/.config?x=ccdd3ebd6715749a
> dashboard link:
> https://syzkaller.appspot.com/bug?extid=c793a7eca38803212c61
> syz repro:     
> https://syzkaller.appspot.com/x/repro.syz?x=16dcd598980000
> C reproducer:  
> https://syzkaller.appspot.com/x/repro.c?x=151d9c78980000
> 
> Reported-by: syzbot+c793a7eca38803212c61@syzkaller.appspotmail.com
> Fixes: a7f3813e589f ("usb: gadget: dummy_hcd: Switch to hrtimer
> transfer scheduler")
> 
> For information about bisection process see:
> https://goo.gl/tpsmEJ#bisection

-- 
 
 

  

    Marcello Sylvester Bauer
    

    Senior Linux Solutions Architect
    

  

  


  

  

    

      
        9elements GmbH, Kortumstraße 19-21, 44787 Bochum, Germany
        
    

    

      
        
          Email: 
          marcello.bauer@9elements.com
          

        
      
      

        
          Phone: 
        
        
          
            +49 234 68 94 188
          
        
      

      

        
          Mobile: 
        
        
          
            +49 172 2847618
          
        
      

    

  






  

    Sitz der Gesellschaft: Bochum
  

  

    Handelsregister: Amtsgericht Bochum, HRB 17519
  

  

    Geschäftsführung: Sebastian Deutsch, Eray Basar
  

  

    

    Datenschutzhinweise nach Art. 13 DSGVO
  


 

  parent reply	other threads:[~2024-06-25 10:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-16 19:17 [syzbot] [usb?] INFO: rcu detected stall in schedule_timeout (6) syzbot
2024-05-16 22:01 ` syzbot
2024-06-04 12:05   ` Marcello Sylvester Bauer
2024-06-04 14:20     ` Alan Stern
2024-06-24 10:25     ` Needed help: dummy_hcd: Fix stalls/inconsistent_lock_state due to hrtimer migration Marcello Sylvester Bauer
2024-06-24 13:19       ` Thomas Gleixner
2024-05-16 22:28 ` [syzbot] [usb?] INFO: rcu detected stall in schedule_timeout (6) Hillf Danton
2024-05-17  0:18   ` syzbot
2024-06-25  9:02 ` [syzbot] " syzbot
2024-06-25 10:24 ` syzbot [this message]
2024-07-08 10:56 ` syzbot

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=00000000000067a8dc061bb44c10@google.com \
    --to=syzbot+c793a7eca38803212c61@syzkaller.appspotmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=syzkaller-bugs@googlegroups.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.