提交 9ffd7503 编写于 作者: A Andri Yngvason 提交者: Marc Kleine-Budde

can: cc770: Fix use after free in cc770_tx_interrupt()

This fixes use after free introduced by the last cc770 patch.
Signed-off-by: NAndri Yngvason <andri.yngvason@marel.com>
Fixes: 74620123 ("can: cc770: Fix queue stall & dropped RTR reply")
Cc: linux-stable <stable@vger.kernel.org>
Signed-off-by: NMarc Kleine-Budde <mkl@pengutronix.de>
上级 a069215c
......@@ -706,13 +706,12 @@ static void cc770_tx_interrupt(struct net_device *dev, unsigned int o)
return;
}
can_put_echo_skb(priv->tx_skb, dev, 0);
can_get_echo_skb(dev, 0);
cf = (struct can_frame *)priv->tx_skb->data;
stats->tx_bytes += cf->can_dlc;
stats->tx_packets++;
can_put_echo_skb(priv->tx_skb, dev, 0);
can_get_echo_skb(dev, 0);
priv->tx_skb = NULL;
netif_wake_queue(dev);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册