summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/cadence
diff options
context:
space:
mode:
authorTristram Ha <Tristram.Ha@microchip.com>2018-10-25 00:51:23 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-12-01 11:17:00 +0300
commit7b557dbdc51947b92dcfe8f13d6fd59d2353d2d9 (patch)
tree2f9f07159cd9e23cd5232c45b217b38b04d965d3 /drivers/net/ethernet/cadence
parent3681b901e94a18e9fbe505f4c7f34536c931ce92 (diff)
downloadlinux-7b557dbdc51947b92dcfe8f13d6fd59d2353d2d9.tar.xz
net: ethernet: cadence: fix socket buffer corruption problem
[ Upstream commit 899ecaedd15599c22553d158f53b127cc1632dc2 ] Socket buffer is not re-created when headroom is 2 and tailroom is 1. Signed-off-by: Tristram Ha <Tristram.Ha@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/cadence')
-rw-r--r--drivers/net/ethernet/cadence/macb_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index 74eeb3a985bf..f175b20ac510 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -1721,7 +1721,7 @@ static int macb_pad_and_fcs(struct sk_buff **skb, struct net_device *ndev)
padlen = 0;
/* No room for FCS, need to reallocate skb. */
else
- padlen = ETH_FCS_LEN - tailroom;
+ padlen = ETH_FCS_LEN;
} else {
/* Add room for FCS. */
padlen += ETH_FCS_LEN;