Skip to content

Commit 8220ce6

Browse files
committed
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: David S. Miller <[email protected]>
2 parents 44caebd + 9ffd750 commit 8220ce6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/net/can/cc770/cc770.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -706,13 +706,12 @@ static void cc770_tx_interrupt(struct net_device *dev, unsigned int o)
706706
return;
707707
}
708708

709-
can_put_echo_skb(priv->tx_skb, dev, 0);
710-
can_get_echo_skb(dev, 0);
711-
712709
cf = (struct can_frame *)priv->tx_skb->data;
713710
stats->tx_bytes += cf->can_dlc;
714711
stats->tx_packets++;
715712

713+
can_put_echo_skb(priv->tx_skb, dev, 0);
714+
can_get_echo_skb(dev, 0);
716715
priv->tx_skb = NULL;
717716

718717
netif_wake_queue(dev);

0 commit comments

Comments
 (0)