diff options
author | Daniel Jurgens <[email protected]> | 2024-05-09 13:36:34 -0500 |
---|---|---|
committer | Jakub Kicinski <[email protected]> | 2024-05-10 18:20:07 -0700 |
commit | b49bd37f0bfd7bbfedd54085d5ea4e854778d283 (patch) | |
tree | 95bda538d2891588a09610e27ded45c4019f7f77 | |
parent | 38155539a16ebb79dbb7a2e058138d70be68d245 (diff) |
virtio_net: Fix memory leak in virtnet_rx_mod_work
The pointer delcaration was missing the __free(kfree).
Fixes: ff7c7d9f5261 ("virtio_net: Remove command data from control_buf")
Reported-by: Jens Axboe <[email protected]>
Closes: https://lore.kernel.org/netdev/[email protected]/
Signed-off-by: Daniel Jurgens <[email protected]>
Tested-by: Jens Axboe <[email protected]>
Reviewed-by: Xuan Zhuo <[email protected]>
Acked-by: Michael S. Tsirkin <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
-rw-r--r-- | drivers/net/virtio_net.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 218a446c4c27..ad0fb832b538 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -2862,7 +2862,6 @@ static int virtnet_set_queues(struct virtnet_info *vi, u16 queue_pairs) static int virtnet_close(struct net_device *dev) { - u8 *promisc_allmulti __free(kfree) = NULL; struct virtnet_info *vi = netdev_priv(dev); int i; @@ -2883,11 +2882,11 @@ static void virtnet_rx_mode_work(struct work_struct *work) { struct virtnet_info *vi = container_of(work, struct virtnet_info, rx_mode_work); + u8 *promisc_allmulti __free(kfree) = NULL; struct net_device *dev = vi->dev; struct scatterlist sg[2]; struct virtio_net_ctrl_mac *mac_data; struct netdev_hw_addr *ha; - u8 *promisc_allmulti; int uc_count; int mc_count; void *buf; |