From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jesper Dangaard Brouer Subject: Re: [bpf-next V5 PATCH 11/15] page_pool: refurbish version of page_pool code Date: Mon, 26 Mar 2018 17:19:38 +0200 Message-ID: <20180326171938.47dc699e@redhat.com> References: <152180742196.20167.5168801400337773178.stgit@firesoul> <152180753479.20167.856688163861554435.stgit@firesoul> <20180323151522.2d3dde07@redhat.com> <796ac33b-26cc-107b-debe-17b5cfceab97@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, =?UTF-8?B?QmrDtnJuVMO2cGVs?= , magnus.karlsson@intel.com, eugenia@mellanox.com, Jason Wang , John Fastabend , Eran Ben Elisha , Saeed Mahameed , galp@mellanox.com, Daniel Borkmann , Alexei Starovoitov , Tariq Toukan , brouer@redhat.com To: Eric Dumazet Return-path: Received: from mx3-rdu2.redhat.com ([66.187.233.73]:36702 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751827AbeCZPTq (ORCPT ); Mon, 26 Mar 2018 11:19:46 -0400 In-Reply-To: <796ac33b-26cc-107b-debe-17b5cfceab97@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: On Fri, 23 Mar 2018 07:55:37 -0700 Eric Dumazet wrote: > rcu grace period before freeing huge quantitites of pages is > problematic and could be used by syzbot to OOM the host. Okay. Adjusted code to empty ring "right-way" when driver calls destroy, and then only RCU delay/free the page_pool pointer and also free/empty ring for pages of any in-flight producers. -- Best regards, Jesper Dangaard Brouer MSc.CS, Principal Kernel Engineer at Red Hat LinkedIn: http://www.linkedin.com/in/brouer