Commit b49bd37f authored by Daniel Jurgens's avatar Daniel Jurgens Committed by Jakub Kicinski

virtio_net: Fix memory leak in virtnet_rx_mod_work

The pointer delcaration was missing the __free(kfree).

Fixes: ff7c7d9f ("virtio_net: Remove command data from control_buf")
Reported-by: default avatarJens Axboe <axboe@kernel.dk>
Closes: https://lore.kernel.org/netdev/0674ca1b-020f-4f93-94d0-104964566e3f@kernel.dk/Signed-off-by: default avatarDaniel Jurgens <danielj@nvidia.com>
Tested-by: default avatarJens Axboe <axboe@kernel.dk>
Reviewed-by: default avatarXuan Zhuo <xuanzhuo@linux.alibaba.com>
Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
Link: https://lore.kernel.org/r/20240509183634.143273-1-danielj@nvidia.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 38155539
......@@ -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;
......
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