Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp5274420rwb; Wed, 17 Aug 2022 14:36:23 -0700 (PDT) X-Google-Smtp-Source: AA6agR4FHPB0pmTBzvzH5EoXjVgPy/QMn3Rhwak7HjKyzctov1QRBpXhtBiJp/7Gg+0TXEkrbZFG X-Received: by 2002:a17:90a:4042:b0:1fa:a752:9e1c with SMTP id k2-20020a17090a404200b001faa7529e1cmr16495pjg.117.1660772182707; Wed, 17 Aug 2022 14:36:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660772182; cv=none; d=google.com; s=arc-20160816; b=W2DgdQ/IBZhPSpM91nWx8vDgIbCxAhy8K8tfCWGZGF8T+qp/UVTolod4v/TDGr7Pv7 b+9gUkZ0KCNZZCUectOozcJlS+oqVqPcVfrKpYxD08qf1IpQN35OA59kaNoMk9K3XOtf JA8A3hu/QckEf6PfB0jbjN0aPXk6x21BRVxqCnOACl+le4zMP8+m2CUwmRvd1DOrTGMM CXsjpJA2gAmPfpFXDFpif2hMrzNi1iFE04qlko2BFkNV8RJdCQu6sSv3gpZroueotI1i UhvOU/f2aMDgyXOo96ZMkn94hOsbvcUEVyafJvMtiNkhABIthiURZkwqNlCXqBEeD+BX RcfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:content-id:mime-version:subject :cc:to:references:in-reply-to:from:organization:dkim-signature; bh=UCPQMtqG0VB+k5U8mjKK0NLp4lpMVU6Bz0wA0P8dEHU=; b=yyVqrk+PjtU8j6ipdDqR3flP+bCXvsPsfTMfsa9GknLLWcKjhMHY8aGq35SRyfF8Rb c32CFoQMVfFEcovr724j2XuC2ivTDzSOhQFy3+Lt9aUtoTFJbHaMAt8oVmJiKMjy00IQ vTMG9pUZHtVIJ1rNO+BtOoNMvQ2Mxuub2ePCJy/sRmddfvEDqV8IVs4dHtUn4fBLVriQ eghR1pUfjWRITUWYakzPzLAQ9aP9GFnFp4kgY3XqTlDar/XcnHDaTFkbj16fQFHSEHmW pmL24NlBT5XN11uFYOsC6m4MJFgvxHlzVKVDIcrmM/d+FMwYeWbfx4Ld9IPGDUHLwdAb iUBQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=eY3BJdf2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m14-20020a6545ce000000b004208b9d6243si20141121pgr.325.2022.08.17.14.36.10; Wed, 17 Aug 2022 14:36:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=eY3BJdf2; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241396AbiHQU4E (ORCPT + 99 others); Wed, 17 Aug 2022 16:56:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233797AbiHQU4A (ORCPT ); Wed, 17 Aug 2022 16:56:00 -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 A0D2FA7231 for ; Wed, 17 Aug 2022 13:55:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1660769758; 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=eY3BJdf2qBFDcCwQ8UpRrpOhitEvmBmjiCNtAX46l4lCKvZSYG/h0rnjEtRuJR5TSKprA/ FajRB4zkMBzRsPtQoVVS84B0DcMCGHlCWcL7szlSO98rCIwp6oZerK2OrTkxs55jVvdLVk D+c0jnezGhGyLoyazW1u7WNnTWszRQo= 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 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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