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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 51BBBC25B08 for ; Wed, 17 Aug 2022 20:56:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231482AbiHQU4A (ORCPT ); Wed, 17 Aug 2022 16:56:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46718 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233797AbiHQUz7 (ORCPT ); Wed, 17 Aug 2022 16:55:59 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 12190A7231 for ; Wed, 17 Aug 2022 13:55:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1660769756; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=UCPQMtqG0VB+k5U8mjKK0NLp4lpMVU6Bz0wA0P8dEHU=; b=ikOG53/rIvP/+b5LsFG3ugJE4SVcS6pi0Mdrm3CWp+ywtHngZ3mz0aZfS2mVJmswBvU3R5 EWPaE5VXbWB9wMdw+6rto65cjEMlF/trRZpKLkUGj8xjXXxMfSTRZxKpkA4KVQzxHtlJon 3SQ1XlxqIM1dmBm4bxY5bGPtSZvu3TI= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-483-bPj_UI21ODiyJxAyER130Q-1; Wed, 17 Aug 2022 16:55:53 -0400 X-MC-Unique: bPj_UI21ODiyJxAyER130Q-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B45B6802E5D; Wed, 17 Aug 2022 20:55:52 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.33.36.72]) by smtp.corp.redhat.com (Postfix) with ESMTP id A05EAC15BB3; Wed, 17 Aug 2022 20:55:50 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: <20220816164435.0558ef94@kernel.org> References: <20220816164435.0558ef94@kernel.org> <20220816103452.479281-1-yin31149@gmail.com> <166064248071.3502205.10036394558814861778.stgit@warthog.procyon.org.uk> <804153.1660684606@warthog.procyon.org.uk> To: Jakub Kicinski Cc: dhowells@redhat.com, Hawkins Jiawei , "David S. Miller" , Eric Dumazet , Paolo Abeni , Alexei Starovoitov , Daniel Borkmann , Andrii Nakryiko , Martin KaFai Lau , Song Liu , Yonghong Song , John Fastabend , KP Singh , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org, bpf@vger.kernel.org, Jakub Sitnicki Subject: Re: [PATCH] net: Fix suspicious RCU usage in bpf_sk_reuseport_detach() MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <3974012.1660769749.1@warthog.procyon.org.uk> Date: Wed, 17 Aug 2022 21:55:49 +0100 Message-ID: <3974013.1660769749@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.85 on 10.11.54.8 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Jakub Kicinski wrote: > I like your version because it documents what the lock protecting this > field is. > > In fact should we also add && sock_owned_by_user(). Martin, WDYT? Would > that work for reuseport? Jakub S is fixing l2tp to hold the socket lock > while setting this field, yet most places take the callback lock... So how do you want to proceed? My first version of the patch with sock_owned_by_user()? David