Re: [PATCH] net: dsa: tag_rtl4_a: Support also egress tags
From: DENG Qingfang <dqfext@gmail.com> Date: 2021-02-17 12:39:45
On Wed, Feb 17, 2021 at 7:55 AM Linus Walleij [off-list ref] wrote:
+
+ /* Pad out to at least 60 bytes */
+ if (unlikely(eth_skb_pad(skb)))
+ return NULL;
I just found that this will cause double free (eth_skb_pad will free
the skb if allocation fails, and dsa_slave_xmit will still try to free
it because it returns NULL.
Replace eth_skb_pad(skb) with __skb_put_padto(skb, ETH_ZLEN, false) to
avoid that.