From: David Howells <dhowells@redhat.com>
To: netdev@vger.kernel.org
Cc: David Howells <dhowells@redhat.com>,
Marc Dionne <marc.dionne@auristor.com>,
Jakub Kicinski <kuba@kernel.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
Christian Brauner <brauner@kernel.org>,
Chuck Lever <chuck.lever@oracle.com>,
linux-afs@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: [PATCH net-next v3 03/14] rxrpc: Remove some socket lock acquire/release annotations
Date: Fri, 11 Apr 2025 10:52:48 +0100 [thread overview]
Message-ID: <20250411095303.2316168-4-dhowells@redhat.com> (raw)
In-Reply-To: <20250411095303.2316168-1-dhowells@redhat.com>
Remove some socket lock acquire/release annotations as lock_sock() and
release_sock() don't have them and so the checker gets confused. Removing
all of them, however, causes warnings about "context imbalance" and "wrong
count at exit" to occur instead.
Probably lock_sock() and release_sock() should have annotations on
indicating their taking of sk_lock - there is a dep_map in socket_lock_t,
but I don't know if that matters to the static checker.
Signed-off-by: David Howells <dhowells@redhat.com>
cc: Marc Dionne <marc.dionne@auristor.com>
cc: Jakub Kicinski <kuba@kernel.org>
cc: "David S. Miller" <davem@davemloft.net>
cc: Eric Dumazet <edumazet@google.com>
cc: Paolo Abeni <pabeni@redhat.com>
cc: Simon Horman <horms@kernel.org>
cc: linux-afs@lists.infradead.org
cc: netdev@vger.kernel.org
---
net/rxrpc/ar-internal.h | 4 +++-
net/rxrpc/call_object.c | 2 +-
net/rxrpc/sendmsg.c | 3 +--
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/net/rxrpc/ar-internal.h b/net/rxrpc/ar-internal.h
index 55810c6b4be8..c267b8ac1bb5 100644
--- a/net/rxrpc/ar-internal.h
+++ b/net/rxrpc/ar-internal.h
@@ -1000,7 +1000,9 @@ struct rxrpc_call *rxrpc_alloc_call(struct rxrpc_sock *, gfp_t, unsigned int);
struct rxrpc_call *rxrpc_new_client_call(struct rxrpc_sock *,
struct rxrpc_conn_parameters *,
struct rxrpc_call_params *, gfp_t,
- unsigned int);
+ unsigned int)
+ __releases(&rx->sk.sk_lock)
+ __acquires(&call->user_mutex);
void rxrpc_start_call_timer(struct rxrpc_call *call);
void rxrpc_incoming_call(struct rxrpc_sock *, struct rxrpc_call *,
struct sk_buff *);
diff --git a/net/rxrpc/call_object.c b/net/rxrpc/call_object.c
index c4c8b46a68c6..d48e9b021d85 100644
--- a/net/rxrpc/call_object.c
+++ b/net/rxrpc/call_object.c
@@ -322,7 +322,7 @@ struct rxrpc_call *rxrpc_new_client_call(struct rxrpc_sock *rx,
struct rxrpc_call_params *p,
gfp_t gfp,
unsigned int debug_id)
- __releases(&rx->sk.sk_lock.slock)
+ __releases(&rx->sk.sk_lock)
__acquires(&call->user_mutex)
{
struct rxrpc_call *call, *xcall;
diff --git a/net/rxrpc/sendmsg.c b/net/rxrpc/sendmsg.c
index 3f62c34ce7de..2342b5f1547c 100644
--- a/net/rxrpc/sendmsg.c
+++ b/net/rxrpc/sendmsg.c
@@ -607,7 +607,7 @@ static int rxrpc_sendmsg_cmsg(struct msghdr *msg, struct rxrpc_send_params *p)
static struct rxrpc_call *
rxrpc_new_client_call_for_sendmsg(struct rxrpc_sock *rx, struct msghdr *msg,
struct rxrpc_send_params *p)
- __releases(&rx->sk.sk_lock.slock)
+ __releases(&rx->sk.sk_lock)
__acquires(&call->user_mutex)
{
struct rxrpc_conn_parameters cp;
@@ -657,7 +657,6 @@ rxrpc_new_client_call_for_sendmsg(struct rxrpc_sock *rx, struct msghdr *msg,
* - the socket may be either a client socket or a server socket
*/
int rxrpc_do_sendmsg(struct rxrpc_sock *rx, struct msghdr *msg, size_t len)
- __releases(&rx->sk.sk_lock.slock)
{
struct rxrpc_call *call;
bool dropped_lock = false;
next prev parent reply other threads:[~2025-04-11 9:53 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-11 9:52 [PATCH net-next v3 00/14] rxrpc, afs: Add AFS GSSAPI security class to AF_RXRPC and kafs David Howells
2025-04-11 9:52 ` [PATCH net-next v3 01/14] rxrpc: kdoc: Update function descriptions and add link from rxrpc.rst David Howells
2025-04-11 9:52 ` [PATCH net-next v3 02/14] rxrpc: Pull out certain app callback funcs into an ops table David Howells
2025-04-11 9:52 ` David Howells [this message]
2025-04-11 9:52 ` [PATCH net-next v3 04/14] rxrpc: Allow CHALLENGEs to the passed to the app for a RESPONSE David Howells
2025-04-11 9:52 ` [PATCH net-next v3 05/14] rxrpc: Add the security index for yfs-rxgk David Howells
2025-04-11 9:52 ` [PATCH net-next v3 06/14] rxrpc: Add YFS RxGK (GSSAPI) security class David Howells
2025-04-11 9:52 ` [PATCH net-next v3 07/14] rxrpc: rxgk: Provide infrastructure and key derivation David Howells
2025-04-11 9:52 ` [PATCH net-next v3 08/14] rxrpc: rxgk: Implement the yfs-rxgk security class (GSSAPI) David Howells
2025-04-11 9:52 ` [PATCH net-next v3 09/14] rxrpc: rxgk: Implement connection rekeying David Howells
2025-04-11 9:52 ` [PATCH net-next v3 10/14] rxrpc: Allow the app to store private data on peer structs David Howells
2025-04-11 9:52 ` [PATCH net-next v3 11/14] rxrpc: Display security params in the afs_cb_call tracepoint David Howells
2025-04-11 9:52 ` [PATCH net-next v3 12/14] afs: Use rxgk RESPONSE to pass token for callback channel David Howells
2025-04-11 9:52 ` [PATCH net-next v3 13/14] rxrpc: Add more CHALLENGE/RESPONSE packet tracing David Howells
2025-04-11 9:52 ` [PATCH net-next v3 14/14] rxrpc: rxperf: Add test RxGK server keys David Howells
2025-04-15 0:50 ` [PATCH net-next v3 00/14] rxrpc, afs: Add AFS GSSAPI security class to AF_RXRPC and kafs patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250411095303.2316168-4-dhowells@redhat.com \
--to=dhowells@redhat.com \
--cc=brauner@kernel.org \
--cc=chuck.lever@oracle.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-afs@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marc.dionne@auristor.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox