diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2014-09-08 11:37:52 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-09-08 16:02:49 -0700 |
commit | b629be5c8399d7c423b92135eb43a86c924d1cbc (patch) | |
tree | 28483cec84c56b551a51d19a25d5479ea948aae5 /lib/crc-itu-t.c | |
parent | fe24ba082b8483c81f546d24e40a55624295b85d (diff) |
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 <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'lib/crc-itu-t.c')
0 files changed, 0 insertions, 0 deletions