lkml.org 
[lkml]   [2022]   [Nov]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [PATCH net] net: ethernet: mtk_eth_soc: fix potential memory leak in mtk_rx_alloc()
    From
    Date
    Hello:

    This patch was applied to netdev/net.git (master)
    by Jakub Kicinski <kuba@kernel.org>:

    On Sun, 20 Nov 2022 11:54:05 +0800 you wrote:
    > When fail to dma_map_single() in mtk_rx_alloc(), it returns directly.
    > But the memory allocated for local variable data is not freed, and
    > local variabel data has not been attached to ring->data[i] yet, so the
    > memory allocated for local variable data will not be freed outside
    > mtk_rx_alloc() too. Thus memory leak would occur in this scenario.
    >
    > Add skb_free_frag(data) when dma_map_single() failed.
    >
    > [...]

    Here is the summary with links:
    - [net] net: ethernet: mtk_eth_soc: fix potential memory leak in mtk_rx_alloc()
    https://git.kernel.org/netdev/net/c/3213f808ae21

    You are awesome, thank you!
    --
    Deet-doot-dot, I am a bot.
    https://korg.docs.kernel.org/patchwork/pwbot.html


    \
     
     \ /
      Last update: 2022-11-23 06:01    [W:2.425 / U:0.184 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site