Commit 8220ce6d authored by David S. Miller's avatar David S. Miller

Merge tag 'linux-can-fixes-for-4.16-20180319' of...

Merge tag 'linux-can-fixes-for-4.16-20180319' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can

Marc Kleine-Budde says:

====================
pull-request: can 2018-03-19

this is a pull reqeust of one patch for net/master.

The patch is by Andri Yngvason and fixes a potential use-after-free bug
in the cc770 driver introduced in the previous pull-request.
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 44caebd3 9ffd7503
......@@ -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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment