From 899ecaedd15599c22553d158f53b127cc1632dc2 Mon Sep 17 00:00:00 2001 From: Tristram Ha Date: Wed, 24 Oct 2018 14:51:23 -0700 Subject: net: ethernet: cadence: fix socket buffer corruption problem Socket buffer is not re-created when headroom is 2 and tailroom is 1. Signed-off-by: Tristram Ha Signed-off-by: David S. Miller --- drivers/net/ethernet/cadence/macb_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/net') diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c index 8f5bf9166c11..1d86b4d5645a 100644 --- a/drivers/net/ethernet/cadence/macb_main.c +++ b/drivers/net/ethernet/cadence/macb_main.c @@ -1684,7 +1684,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; -- cgit v1.2.3-58-ga151