drivers: usb: device: raspberrypi_pico_usbd - use of uninitialized semaphore #83806
Labels
area: USB
Universal Serial Bus
bug
The issue is a bug, or the PR is fixing a bug
platform: Raspberry Pi Pico
Raspberry Pi Pico (RPi Pico)
Describe the bug
In some cases the write semaphore is used before it was initialized. This leads to a fatal error.
In my case this happens just after
irq_enable(USB_IRQ); (https://github.com/zephyrproject-rtos/zephyr/blob/main/drivers/usb/device/usb_dc_rpi_pico.c#L1076)
To Reproduce
configure a cdc-acm-uart on the usb device and restart the device (via gdb) till it just happens during boot.
Expected behavior
nothing should use a semaphore before it was initialized.
Environment (please complete the following information):
Additional context
I use the usb interface for a cdc-acm-uart on a raspberryPi pico (rp2040). With the following configured options:
CONFIG_DEBUG=y
CONFIG_DEBUG_OPTIMIZATIONS=y
CONFIG_NO_OPTIMIZATIONS=y
CONFIG_LOG_SPEED=y
and it disappears or seems to happen less frequently if the compiler optimization is enabled.
The text was updated successfully, but these errors were encountered: