net: stmmac: fix potential double free of dma descriptor resources
LoongArch inclusion category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I733VA -------------------------------- reset the dma descriptor related resource's pointer to NULL,otherwise a potential double free problem may be triggered: stmmac_open alloc_dma_desc_resources init_dma_desc_rings stmmac_hw_setup (Failed) goto init_error; free_dma_desc_resources(priv); (DMA related resource pointer not reset to NULL) ... stmmac_open alloc_dma_desc_resources alloc_dma_tx_desc_resources (Failed) free_dma_tx_desc_resources (Double free of tx_q->tx_skbuff_dma tx_q->tx_skbuff) Signed-off-by: NHongchen Zhang <zhanghongchen@loongson.cn> Change-Id: Ie917b7402e86cbd1b253553c10ac4a5440e38c03 (cherry picked from commit 47021bed)
Showing
想要评论请 注册 或 登录