linux-stable/include
Dmitry Osipenko 18bbb1d165 usb: otg-fsm: Fix hrtimer list corruption
commit bf88fef0b6 upstream.

The HNP work can be re-scheduled while it's still in-fly. This results in
re-initialization of the busy work, resetting the hrtimer's list node of
the work and crashing kernel with null dereference within kernel/timer
once work's timer is expired. It's very easy to trigger this problem by
re-plugging USB cable quickly. Initialize HNP work only once to fix this
trouble.

 Unable to handle kernel NULL pointer dereference at virtual address 00000126)
 ...
 PC is at __run_timers.part.0+0x150/0x228
 LR is at __next_timer_interrupt+0x51/0x9c
 ...
 (__run_timers.part.0) from [<c0187a2b>] (run_timer_softirq+0x2f/0x50)
 (run_timer_softirq) from [<c01013ad>] (__do_softirq+0xd5/0x2f0)
 (__do_softirq) from [<c012589b>] (irq_exit+0xab/0xb8)
 (irq_exit) from [<c0170341>] (handle_domain_irq+0x45/0x60)
 (handle_domain_irq) from [<c04c4a43>] (gic_handle_irq+0x6b/0x7c)
 (gic_handle_irq) from [<c0100b65>] (__irq_svc+0x65/0xac)

Cc: stable@vger.kernel.org
Acked-by: Peter Chen <peter.chen@kernel.org>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Link: https://lore.kernel.org/r/20210717182134.30262-6-digetx@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-08-15 13:03:31 +02:00
..
acpi ACPI: scan: Use unique number for instance_no 2021-03-30 14:40:12 +02:00
asm-generic
clocksource
crypto crypto: shash - avoid comparing pointers to exported functions under CFI 2021-07-20 16:17:32 +02:00
drm drm: Return -ENOTTY for non-drm ioctls 2021-07-28 11:12:20 +02:00
dt-bindings
keys
kvm
linux usb: otg-fsm: Fix hrtimer list corruption 2021-08-15 13:03:31 +02:00
math-emu
media
memory
misc
net Bluetooth: defer cleanup of resources in hci_unregister_dev() 2021-08-15 13:03:30 +02:00
pcmcia
ras
rdma
scsi scsi: iscsi: Add iscsi_cls_conn refcount helpers 2021-07-20 16:17:49 +02:00
soc
sound
target
trace
uapi icmp: don't send out ICMP messages with a source address of 0.0.0.0 2021-06-30 08:48:51 -04:00
video
xen