Re: [OOPS] cppi41_dma_channel_program: Unable to handle kernel NULL pointer dereference

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

 



Hi,

On Fri, May 20, 2016 at 4:20 PM, Matwey V. Kornilov <matwey@xxxxxxxxxx> wrote:
> 2016-05-21 0:12 GMT+03:00 Bin Liu <b-liu@xxxxxx>:
>> Hi,
>>
>> On Sat, May 21, 2016 at 12:05:06AM +0300, Matwey V. Kornilov wrote:
>>> By the way, is it ok that function musb_rx_dma_iso_cppi41 uses
>>> hw_ep->tx_channel? I would suppose that it should use rx_channel
>>> instead.
>>
>> I just got here, and am wondering the same. But the question is why just
>> your case hit the problem. I will try to look at it more next week.
>>
>> I had an impression the linux-usb@ has a discussion before about
>> rx/tx-channel messing up, will have to look it up.
>>
>
> Thank you.
> If you need additional info, I can use kgdb with this issue.

After reviewed the code, it must be hw_ep->rx_channel instead. It is likely a
bug caused by commit 069a3fd (usb: musb: Remove ifdefs for musb_host_rx
in musb_host.c part1). Please test with the following patch.

Regards,
-Bin.

-----8<---------
diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c
index 2f8ad7f..9b2553c 100644
--- a/drivers/usb/musb/musb_host.c
+++ b/drivers/usb/musb/musb_host.c
@@ -1551,7 +1551,7 @@ static int musb_rx_dma_iso_cppi41(struct
dma_controller *dma,
                                  struct urb *urb,
                                  size_t len)
 {
-       struct dma_channel *channel = hw_ep->tx_channel;
+       struct dma_channel *channel = hw_ep->rx_channel;
        void __iomem *epio = hw_ep->regs;
        dma_addr_t *buf;
        u32 length, res;
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Arm (vger)]     [ARM Kernel]     [ARM MSM]     [Linux Tegra]     [Linux WPAN Networking]     [Linux Wireless Networking]     [Maemo Users]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux