Skip to content
Commit 10a05017 authored by Bilal Wasim's avatar Bilal Wasim Committed by Carles Cufí
Browse files

drivers: eth: stm32: Fix driver crash caused by RX IRQ trigger



All initialization of the Ethernet interface is done in the
eth_initialize function which is invoked by the boot code.
This function sets up DMA, programs the Ethernet module and
enables IRQs. However, this function does not setup "netif"
interface info which is done when the ethernet device is
enumerated by the NET stack via the "iface_api.init" func.
However, after the eth_initialize func is called, it is
possible that the system receives RX interrupts, and the
"rx_thread" accesses the "netif" pointer to get iface info.
However, because the "netif" info is not necessarily
populated at this time, we get a crash (as OS does NULL
access).

Fixed by enabling Ethernet IRQ after the interface is
properly setup.

Tested on Nucleo F767Zi board.

Fixes #25408

Signed-off-by: default avatarBilal Wasim <bilalwasim676@gmail.com>
parent b7af4ffd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment