• Florian Fainelli's avatar
    net: systemport: check harder for out of memory conditions · fe24ba08
    Florian Fainelli authored
    There is a potential case where we might be failing to refill a
    control block, leaving it with both a NULL skb pointer *and* a NULL
    dma_unmap_addr.
    
    The way we process incoming packets, by first calling
    dma_unmap_single(), and then only checking for a potential NULL skb can
    lead to situations where do pass a NULL dma_unmap_addr() to
    dma_unmap_single(), resulting in an oops.
    
    Fix this my moving the NULL skb check earlier, since no backing skb
    also means no corresponding DMA mapping for this packet.
    Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    fe24ba08
bcmsysport.c 50.3 KB