From: Florian Fainelli Date: Mon, 8 Sep 2014 18:37:52 +0000 (-0700) Subject: net: bcmgenet: check harder for out of memory conditions X-Git-Tag: fixes-for-v3.18-merge-window~87^2~46^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b629be5c8399d7c423b92135eb43a86c924d1cbc;p=pandora-kernel.git net: bcmgenet: check harder for out of memory conditions 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: Florian Fainelli Signed-off-by: David S. Miller --- Reading git-diff-tree failed