Subject: Re: [PATCH bpf-next 1/2] net: use the right variant of kfree

From: Jesper Dangaard Brouer <[email-masked]>
Date: Wed, 10 Jan 2018 11:58:26 +0100

On Wed, 10 Jan 2018 01:20:01 -0800
Jakub Kicinski <[email-masked]> wrote:

> kvzalloc'ed memory should be kvfree'd.
> 
> Fixes: e817f85652c1 ("xdp: generic XDP handling of xdp_rxq_info")
> Signed-off-by: Jakub Kicinski <[email-masked]>
> Reviewed-by: Simon Horman <[email-masked]>
> ---
>  net/core/dev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/core/dev.c b/net/core/dev.c
> index d7925ef8743d..852a54c769a3 100644
> --- a/net/core/dev.c
> +++ b/net/core/dev.c
> @@ -7645,7 +7645,7 @@ static int netif_alloc_rx_queues(struct net_device *dev)
>  	/* 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;
>  }

Thanks for catching this!

Acked-by: Jesper Dangaard Brouer <[email-masked]>

-- 
Best regards,
  Jesper Dangaard Brouer
  MSc.CS, Principal Kernel Engineer at Red Hat
  LinkedIn: http://www.linkedin.com/in/brouer