From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Borkmann Subject: Re: [PATCH bpf] xsk: do not call synchronize_net() under RCU read lock Date: Thu, 11 Oct 2018 10:22:20 +0200 Message-ID: <5b228baf-078c-0053-e99b-6d6969b304b1@iogearbox.net> References: <20181008174016.12307-1-bjorn.topel@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= , magnus.karlsson@intel.com, magnus.karlsson@gmail.com To: =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= , ast@kernel.org, netdev@vger.kernel.org, eric.dumazet@gmail.com Return-path: Received: from www62.your-server.de ([213.133.104.62]:38832 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726008AbeJKPsg (ORCPT ); Thu, 11 Oct 2018 11:48:36 -0400 In-Reply-To: <20181008174016.12307-1-bjorn.topel@gmail.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 10/08/2018 07:40 PM, Björn Töpel wrote: > From: Björn Töpel > > The XSKMAP update and delete functions called synchronize_net(), which > can sleep. It is not allowed to sleep during an RCU read section. > > Instead we need to make sure that the sock sk_destruct (xsk_destruct) > function is asynchronously called after an RCU grace period. Setting > the SOCK_RCU_FREE flag for XDP sockets takes care of this. > > Fixes: fbfc504a24f5 ("bpf: introduce new bpf AF_XDP map type BPF_MAP_TYPE_XSKMAP") > Reported-by: Eric Dumazet > Signed-off-by: Björn Töpel Applied to bpf, thanks everyone!