Commit 899ecaed authored by Tristram Ha's avatar Tristram Ha Committed by David S. Miller

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: default avatarTristram Ha <Tristram.Ha@microchip.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 4f3ebb04
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment