[Bug 217242] CPU hard lockup related to xhci/dma

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



https://bugzilla.kernel.org/show_bug.cgi?id=217242

--- Comment #17 from Mathias Nyman (mathias.nyman@xxxxxxxxxxxxxxx) ---
Thanks, one reason why ring expansion calculation is incorrect is that we try
to store a negative value in an unsigned int. 

static int prepare_ring(...)
{
        unsigned int num_trbs_needed;        
        ....
        num_trbs_needed = num_trbs - ep_ring->num_trbs_free;
}

ep_ring->num_trbs_free might be bigger than num_trbs

So we end up with a huge and incorrect num_trbs_needed

https://elixir.bootlin.com/linux/v6.2/source/drivers/usb/host/xhci-ring.c#L3186

In addition to this there is most likely a small bug in tracking
ep_ring->num_trbs_free, gradually decreasing it incorrectly.
Not sure where that happens

Still working on that debugging patch

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux