[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190614135806.4bcb1a31@carbon>
Date: Fri, 14 Jun 2019 13:58:06 +0200
From: Jesper Dangaard Brouer <brouer@...hat.com>
To: Toshiaki Makita <toshiaki.makita1@...il.com>
Cc: Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <jakub.kicinski@...ronome.com>,
Jesper Dangaard Brouer <hawk@...nel.org>,
John Fastabend <john.fastabend@...il.com>,
netdev@...r.kernel.org, xdp-newbies@...r.kernel.org,
bpf@...r.kernel.org, "Michael S. Tsirkin" <mst@...hat.com>,
Jason Wang <jasowang@...hat.com>,
David Ahern <dsahern@...il.com>, brouer@...hat.com
Subject: Re: [PATCH bpf 2/3] devmap: Add missing bulk queue free
On Fri, 14 Jun 2019 17:20:14 +0900
Toshiaki Makita <toshiaki.makita1@...il.com> wrote:
> dev_map_free() forgot to free bulk queue when freeing its entries.
>
> Fixes: 5d053f9da431 ("bpf: devmap prepare xdp frames for bulking")
> Signed-off-by: Toshiaki Makita <toshiaki.makita1@...il.com>
> ---
> kernel/bpf/devmap.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/kernel/bpf/devmap.c b/kernel/bpf/devmap.c
> index e001fb1..a126d95 100644
> --- a/kernel/bpf/devmap.c
> +++ b/kernel/bpf/devmap.c
> @@ -186,6 +186,7 @@ static void dev_map_free(struct bpf_map *map)
> if (!dev)
> continue;
>
> + free_percpu(dev->bulkq);
> dev_put(dev->dev);
> kfree(dev);
> }
Do we need to call need to call dev_map_flush_old() before
free_percpu(dev->bulkq) ?
Looking the code, I guess this is not needed as, above we are ensuring
all pending flush operations have completed.
Acked-by: Jesper Dangaard Brouer <brouer@...hat.com>
--
Best regards,
Jesper Dangaard Brouer
MSc.CS, Principal Kernel Engineer at Red Hat
LinkedIn: http://www.linkedin.com/in/brouer
Powered by blists - more mailing lists