diff options
author | Tristram Ha <Tristram.Ha@microchip.com> | 2018-10-24 14:51:23 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-10-25 11:32:24 -0700 |
commit | 899ecaedd15599c22553d158f53b127cc1632dc2 (patch) | |
tree | f92b5ecc2eb123640fba833a45952d01854d32c9 /drivers | |
parent | 4f3ebb04d05fe36f74ef17c6ee06559626d47964 (diff) | |
download | linux-899ecaedd15599c22553d158f53b127cc1632dc2.tar.bz2 |
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 <Tristram.Ha@microchip.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ethernet/cadence/macb_main.c | 2 |
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 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; |