• Clemens Gruber's avatar
    usb: chipidea: udc: fix NULL ptr dereference in isr_setup_status_phase · 6f3c4fb6
    Clemens Gruber authored
    Problems with the signal integrity of the high speed USB data lines or
    noise on reference ground lines can cause the i.MX6 USB controller to
    violate USB specs and exhibit unexpected behavior.
    
    It was observed that USBi_UI interrupts were triggered first and when
    isr_setup_status_phase was called, ci->status was NULL, which lead to a
    NULL pointer dereference kernel panic.
    
    This patch fixes the kernel panic, emits a warning once and returns
    -EPIPE to halt the device and let the host get stalled.
    It also adds a comment to point people, who are experiencing this issue,
    to their USB hardware design.
    
    Cc: <stable@vger.kernel.org> #4.1+
    Signed-off-by: default avatarClemens Gruber <clemens.gruber@pqgruber.com>
    Signed-off-by: default avatarPeter Chen <peter.chen@nxp.com>
    6f3c4fb6
udc.c 47.9 KB