]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: bcmgenet: fix dma api length mismatch
authorEric Dumazet <edumazet@google.com>
Thu, 17 Mar 2016 18:57:06 +0000 (11:57 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 20 Apr 2016 06:45:15 +0000 (15:45 +0900)
commit7e6466976f61fa492bc89adbea6ab02adff38655
tree4896c06a61bb2377f78261350d34456f75416c18
parente4a69bcc051851d52e1fddc65698187d5a99aabd
net: bcmgenet: fix dma api length mismatch

[ Upstream commit eee577232203842b4dcadb7ab477a298479633ed ]

When un-mapping skb->data in __bcmgenet_tx_reclaim(),
we must use the length that was used in original dma_map_single(),
instead of skb->len that might be bigger (includes the frags)

We simply can store skb_len into tx_cb_ptr->dma_len and use it
at unmap time.

Fixes: 1c1008c793fa ("net: bcmgenet: add main driver file")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/broadcom/genet/bcmgenet.c