Skip to content

Commit 899ecae

Browse files
triha2workdavem330
authored andcommitted
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>
1 parent 4f3ebb0 commit 899ecae

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/net/ethernet/cadence/macb_main.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1684,7 +1684,7 @@ static int macb_pad_and_fcs(struct sk_buff **skb, struct net_device *ndev)
16841684
padlen = 0;
16851685
/* No room for FCS, need to reallocate skb. */
16861686
else
1687-
padlen = ETH_FCS_LEN - tailroom;
1687+
padlen = ETH_FCS_LEN;
16881688
} else {
16891689
/* Add room for FCS. */
16901690
padlen += ETH_FCS_LEN;

0 commit comments

Comments
 (0)