• Antoine Tenart's avatar
    net: mvpp2: fix the txq_init error path · ba2d8d88
    Antoine Tenart authored
    When an allocation in the txq_init path fails, the allocated buffers
    end-up being freed twice: in the txq_init error path, and in txq_deinit.
    This lead to issues as txq_deinit would work on already freed memory
    regions:
    
        kernel BUG at mm/slub.c:3915!
        Internal error: Oops - BUG: 0 [#1] PREEMPT SMP
    
    This patch fixes this by removing the txq_init own error path, as the
    txq_deinit function is always called on errors. This was introduced by
    TSO as way more buffers are allocated.
    
    Fixes: 186cd4d4 ("net: mvpp2: software tso support")
    Signed-off-by: default avatarAntoine Tenart <antoine.tenart@free-electrons.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    ba2d8d88
mvpp2.c 234 KB