mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-05-03 13:53:48 +00:00
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>
This commit is contained in:
parent
4f3ebb04d0
commit
899ecaedd1
1 changed files with 1 additions and 1 deletions
|
@ -1684,7 +1684,7 @@ static int macb_pad_and_fcs(struct sk_buff **skb, struct net_device *ndev)
|
||||||
padlen = 0;
|
padlen = 0;
|
||||||
/* No room for FCS, need to reallocate skb. */
|
/* No room for FCS, need to reallocate skb. */
|
||||||
else
|
else
|
||||||
padlen = ETH_FCS_LEN - tailroom;
|
padlen = ETH_FCS_LEN;
|
||||||
} else {
|
} else {
|
||||||
/* Add room for FCS. */
|
/* Add room for FCS. */
|
||||||
padlen += ETH_FCS_LEN;
|
padlen += ETH_FCS_LEN;
|
||||||
|
|
Loading…
Add table
Reference in a new issue