From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A59EFC31E44 for ; Fri, 14 Jun 2019 11:58:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 783982133D for ; Fri, 14 Jun 2019 11:58:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727418AbfFNL6V (ORCPT ); Fri, 14 Jun 2019 07:58:21 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36736 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727054AbfFNL6V (ORCPT ); Fri, 14 Jun 2019 07:58:21 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 720A8308FB9D; Fri, 14 Jun 2019 11:58:20 +0000 (UTC) Received: from carbon (ovpn-200-32.brq.redhat.com [10.40.200.32]) by smtp.corp.redhat.com (Postfix) with ESMTP id 674C260BE0; Fri, 14 Jun 2019 11:58:08 +0000 (UTC) Date: Fri, 14 Jun 2019 13:58:06 +0200 From: Jesper Dangaard Brouer To: Toshiaki Makita Cc: Alexei Starovoitov , Daniel Borkmann , "David S. Miller" , Jakub Kicinski , Jesper Dangaard Brouer , John Fastabend , netdev@vger.kernel.org, xdp-newbies@vger.kernel.org, bpf@vger.kernel.org, "Michael S. Tsirkin" , Jason Wang , David Ahern , brouer@redhat.com Subject: Re: [PATCH bpf 2/3] devmap: Add missing bulk queue free Message-ID: <20190614135806.4bcb1a31@carbon> In-Reply-To: <20190614082015.23336-3-toshiaki.makita1@gmail.com> References: <20190614082015.23336-1-toshiaki.makita1@gmail.com> <20190614082015.23336-3-toshiaki.makita1@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.43]); Fri, 14 Jun 2019 11:58:20 +0000 (UTC) Sender: bpf-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org On Fri, 14 Jun 2019 17:20:14 +0900 Toshiaki Makita 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 > --- > 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 -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer