diff options
author | 2018-01-10 12:06:18 +0100 | |
---|---|---|
committer | 2018-01-10 12:06:18 +0100 | |
commit | 148989d8bac36a5f9823715c9910adedbe847ae6 (patch) | |
tree | a6dae59bfd56945e9d909abaef526f62e657853c | |
parent | bpf: fix verifier GPF in kmalloc failure path (diff) | |
parent | net: free RX queue structures (diff) | |
download | wireguard-linux-148989d8bac36a5f9823715c9910adedbe847ae6.tar.xz wireguard-linux-148989d8bac36a5f9823715c9910adedbe847ae6.zip |
Merge branch 'bpf-xdp-rxq-fixes'
Jakub Kicinski says:
====================
Two more trivial fixes to the recent XDP RXQ series.
====================
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to '')
-rw-r--r-- | net/core/dev.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index d7925ef8743d..74e1e5d31337 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -7645,7 +7645,7 @@ err_rxq_info: /* Rollback successful reg's and free other resources */ while (i--) xdp_rxq_info_unreg(&rx[i].xdp_rxq); - kfree(dev->_rx); + kvfree(dev->_rx); dev->_rx = NULL; return err; } @@ -7653,16 +7653,15 @@ err_rxq_info: static void netif_free_rx_queues(struct net_device *dev) { unsigned int i, count = dev->num_rx_queues; - struct netdev_rx_queue *rx; /* netif_alloc_rx_queues alloc failed, resources have been unreg'ed */ if (!dev->_rx) return; - rx = dev->_rx; - for (i = 0; i < count; i++) - xdp_rxq_info_unreg(&rx[i].xdp_rxq); + xdp_rxq_info_unreg(&dev->_rx[i].xdp_rxq); + + kvfree(dev->_rx); } static void netdev_init_one_queue(struct net_device *dev, |