Home
last modified time | relevance | path

Searched hist:b25b343db0526669947a427e9a31bac91d29bb06 (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/net/ethernet/broadcom/
H A Dbcm4908_enet.cdiff b25b343db0526669947a427e9a31bac91d29bb06 Fri Apr 02 12:40:19 CDT 2021 Lv Yunlong <lyl2019@mail.ustc.edu.cn> net: broadcom: bcm4908enet: Fix a double free in bcm4908_enet_dma_alloc

In bcm4908_enet_dma_alloc, if callee bcm4908_dma_alloc_buf_descs() failed,
it will free the ring->cpu_addr by dma_free_coherent() and return error.
Then bcm4908_enet_dma_free() will be called, and free the same cpu_addr
by dma_free_coherent() again.

My patch set ring->cpu_addr to NULL after it is freed in
bcm4908_dma_alloc_buf_descs() to avoid the double free.

Fixes: 4feffeadbcb2e ("net: broadcom: bcm4908enet: add BCM4908 controller driver")
Signed-off-by: Lv Yunlong <lyl2019@mail.ustc.edu.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>