William Wu 943b52284b usb: dwc3: gadget: fix NULL pointer dereference in dwc3_wIndex_to_dep
This patch fixes the kernel panic issue when do reboot test
on RV1126 USB AI Camera Board with the following error log:

[3.818529] android_work: did not send uevent (0 0   (null))
[3.890319] android_work: sent uevent USB_STATE=CONNECTED
[3.929523] configfs-gadget gadget: high-speed config #1: b
[3.929743] configfs-gadget gadget: uvc_function_set_alt(2, 0)
[3.929771] configfs-gadget gadget: reset UVC Control
[3.929806] configfs-gadget gadget: uvc_function_set_alt(3, 0)
[3.930243] android_work: sent uevent USB_STATE=CONFIGURED
[3.931423] dwc3 ffd00000.dwc3: unexpected direction for Data Phase
[3.931543] Unable to handle kernel NULL pointer dereference at virtual address 0000005c
[3.933344] pgd = 6319bbbb
[3.933600] [0000005c] *pgd=00000000
[3.933941] Internal error: Oops: 17 [#1] PREEMPT SMP ARM
[3.934433] Modules linked in: galcore(O)
[3.934832] CPU: 0 PID: 568 Comm: irq/61-dwc3 Tainted: G           O      4.19.111 #9
[3.935523] Hardware name: Generic DT based system
[3.935974] PC is at dwc3_ep0_interrupt+0x638/0x80c
[3.936417] LR is at dwc3_thread_interrupt+0x7d4/0xbfc
[3.936897] pc : [<b0521224>]    lr : [<b051ea4c>]    psr: 600d00d3
[3.937462] sp : e607fe88  ip : 00000003  fp : e837d040
[3.937925] r10: e830e640  r9 : 00000008  r8 : e8302900
[3.938386] r7 : 00000000  r6 : e607ff08  r5 : e837d040  r4 : b0c08c48
[3.938965] r3 : 00000050  r2 : 00000000  r1 : e9042000  r0 : 00000004
[3.939546] Flags: nZCv  IRQs off  FIQs off  Mode SVC_32  ISA ARM  Segment user
[3.940213] Control: 10c5387d  Table: 3671c06a  DAC: 00000055
...
[4.013246] [<b0521224>] (dwc3_ep0_interrupt) from [<b051ea4c>] (dwc3_thread_interrupt+0x7d4/0xbfc)
[4.014059] [<b051ea4c>] (dwc3_thread_interrupt) from [<b016ded0>] (irq_thread_fn+0x1c/0x7c)
[4.014835] [<b016ded0>] (irq_thread_fn) from [<b016e1d4>] (irq_thread+0x124/0x200)
[4.015520] [<b016e1d4>] (irq_thread) from [<b014290c>] (kthread+0x140/0x170)
[4.016175] [<b014290c>] (kthread) from [<b01010d8>] (ret_from_fork+0x14/0x3c)
[4.016831] Exception stack(0xe607ffb0 to 0xe607fff8)

Change-Id: I4191444b527eb03a5283f662b1ad4c9d9c08cd19
Signed-off-by: William Wu <william.wu@rock-chips.com>
2020-07-13 11:58:53 +08:00
2019-02-10 00:33:21 +08:00
2020-03-03 07:33:01 +01:00
2020-07-06 20:34:02 +08:00
2020-07-02 10:21:15 +08:00
2020-06-09 22:19:16 +08:00
2019-02-10 00:33:21 +08:00
2019-02-10 00:33:21 +08:00
2019-08-29 19:45:37 +08:00
2019-08-29 19:45:37 +08:00

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
See Documentation/00-INDEX for a list of what is contained in each file.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.
Description
No description provided
Readme 7.9 GiB
Languages
C 97.7%
Assembly 1.6%
Makefile 0.3%
Perl 0.1%