[net-next,22/35] rxrpc: Don't use sk->sk_receive_queue.lock to guard socket state changes
Message ID | 166982744839.621383.17007015557156214209.stgit@warthog.procyon.org.uk |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp1041837wrr; Wed, 30 Nov 2022 09:04:34 -0800 (PST) X-Google-Smtp-Source: AA0mqf7ysu7inypyhzr8OnEQ7dwkeuJJ8ajAViVgnWf1FXjTf9y/RJiNj7GAFvL6HCJAMFMoM1oB X-Received: by 2002:a17:906:6887:b0:7c0:a728:6aeb with SMTP id n7-20020a170906688700b007c0a7286aebmr1500496ejr.438.1669827874293; Wed, 30 Nov 2022 09:04:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669827874; cv=none; d=google.com; s=arc-20160816; b=s1Ll1oSzKq7AY0GF/soqX135qzirzef6Vf68hDidulS4/vfQUfyOLfzK+0uCr2TYiL qUYSQQekO8WsAkuIO6q/7+0bu2f4e5+MXBtqhSrEimzfy2Y/8z/WTIB+o8I4zMnpFH2H smMhXU7JZtZ2XPnWWdk1bEFT+oDYzCB+ZevnGMll/ghOl6rldWkY7gm3u5rLzRhmC/EI aVoelGR9VI2fbqVF3VkJWqoExvZp3R+gNsTm4laFtkVazHORUc8wUSZZV6FkY6BG2RJX emfC2NCxCgNBCp7O8NAxaSXBA3DVOsmsNwWwqyfiKSRDhjDQfel3B4mnRpoAhxy743tN CG/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:cc:to:from :subject:organization:dkim-signature; bh=5PNaYT+Sz99XRNBjyLDOgrtAK/xBqCVeZx4CGkNAneI=; b=nIMj7wmYIRCzKrbAKGUSTtSvazWgBdSxP+rlySRPG9OEk2htzbZg6E9sB2Wuey+ZjY bJvaiv97j7tSVNZnZtXUqHzYAPSastJFxaDRzJbeHJU91N052am6m8/q/J5ss2MLThk9 x2eTCEJy81G2K1eFgmv/V13hMx3K/RaObmcG2SGOUwxKSFk5EDNmcdQu/7suj+l3bdXM dCv7/pW1CXP7FCuBtSllGlJm4J+QcCNidNUy3lUr77JXkwUyKF0uYi8FiTWuramFI3um G7/v4DpVsFnbuJFagPY7E8NxtG3fJobOoGVfiLt7QnMa+xfciEDuUyaAsE2f7lWlgMd/ sLZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=SSlacf02; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v10-20020aa7cd4a000000b0046b51067317si1604036edw.301.2022.11.30.09.04.10; Wed, 30 Nov 2022 09:04:34 -0800 (PST) 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=SSlacf02; 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 S230025AbiK3RAn (ORCPT <rfc822;heyuhang3455@gmail.com> + 99 others); Wed, 30 Nov 2022 12:00:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229690AbiK3RAK (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 30 Nov 2022 12:00:10 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5AA21F73 for <linux-kernel@vger.kernel.org>; Wed, 30 Nov 2022 08:57:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669827457; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5PNaYT+Sz99XRNBjyLDOgrtAK/xBqCVeZx4CGkNAneI=; b=SSlacf02F53wBNabWkQ+BQ/Mb1Wxu56TPaQc02SBUp8L1ph3DpAf7mM04TzBuVVh9tIkMa z3kgHvWEvGNcIYzXwDlo2nSYI0yJJO/TNGLWehSv0JjvYRE5KW7TxsTaC+A6JPG87PrCEs hRHQLUHqN7hXCG71o4U6MsGKt1spABw= Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-120-mVBMQwUBP2i2fCO7O-6Gew-1; Wed, 30 Nov 2022 11:57:32 -0500 X-MC-Unique: mVBMQwUBP2i2fCO7O-6Gew-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 98F9B3C11040; Wed, 30 Nov 2022 16:57:31 +0000 (UTC) Received: from warthog.procyon.org.uk (unknown [10.33.36.36]) by smtp.corp.redhat.com (Postfix) with ESMTP id F327A2166B26; Wed, 30 Nov 2022 16:57:30 +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 Subject: [PATCH net-next 22/35] rxrpc: Don't use sk->sk_receive_queue.lock to guard socket state changes From: David Howells <dhowells@redhat.com> To: netdev@vger.kernel.org Cc: Marc Dionne <marc.dionne@auristor.com>, linux-afs@lists.infradead.org, dhowells@redhat.com, linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org Date: Wed, 30 Nov 2022 16:57:28 +0000 Message-ID: <166982744839.621383.17007015557156214209.stgit@warthog.procyon.org.uk> In-Reply-To: <166982725699.621383.2358362793992993374.stgit@warthog.procyon.org.uk> References: <166982725699.621383.2358362793992993374.stgit@warthog.procyon.org.uk> User-Agent: StGit/1.5 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750941432935058691?= X-GMAIL-MSGID: =?utf-8?q?1750941432935058691?= |
Series |
rxrpc: Increasing SACK size and moving away from softirq, parts 2 & 3
|
|
Commit Message
David Howells
Nov. 30, 2022, 4:57 p.m. UTC
Don't use sk->sk_receive_queue.lock to guard socket state changes as the
socket mutex is sufficient.
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: linux-afs@lists.infradead.org
---
net/rxrpc/af_rxrpc.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/net/rxrpc/af_rxrpc.c b/net/rxrpc/af_rxrpc.c index 7a0dc01741e7..8ad4d85acb0b 100644 --- a/net/rxrpc/af_rxrpc.c +++ b/net/rxrpc/af_rxrpc.c @@ -812,14 +812,12 @@ static int rxrpc_shutdown(struct socket *sock, int flags) lock_sock(sk); - spin_lock_bh(&sk->sk_receive_queue.lock); if (sk->sk_state < RXRPC_CLOSE) { sk->sk_state = RXRPC_CLOSE; sk->sk_shutdown = SHUTDOWN_MASK; } else { ret = -ESHUTDOWN; } - spin_unlock_bh(&sk->sk_receive_queue.lock); rxrpc_discard_prealloc(rx); @@ -872,9 +870,7 @@ static int rxrpc_release_sock(struct sock *sk) break; } - spin_lock_bh(&sk->sk_receive_queue.lock); sk->sk_state = RXRPC_CLOSE; - spin_unlock_bh(&sk->sk_receive_queue.lock); if (rx->local && rcu_access_pointer(rx->local->service) == rx) { write_lock(&rx->local->services_lock);