Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7b557dbd authored by Tristram Ha's avatar Tristram Ha Committed by Greg Kroah-Hartman
Browse files

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: default avatarTristram Ha <Tristram.Ha@microchip.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 3681b901
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;