Thread (2 messages) flat view 2 messages, 2 authors, 2d ago

Re: [PATCH] net: stmmac: clear dma_conf on MTU change failure

From: Maxime Chevallier <maxime.chevallier@bootlin.com>
Date: 2026-09-03 12:45:04
Also in: linux-arm-kernel, lkml

Hi,

On 9/3/26 12:50, ZhaoJinming wrote:
stmmac_change_mtu() releases the current DMA configuration and then
reopens the interface with a freshly allocated dma_conf.  __stmmac_open()
copies that dma_conf into priv->dma_conf via memcpy() before it can fail
(e.g. in stmmac_request_irq()).  When it does fail, the error path frees
the dma_conf descriptor resources and the struct itself, but priv->dma_conf
still holds pointers to those freed resources.
Following that logic, it seems that the problem is rather that __stmmac_open()
should clear its priv->dma_conf in the error path. It would undo what was done,
leaving the state consistent.

Maxime
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help