Skip to content

Commit

Permalink
SUNRPC: use different lock keys for INET6 and LOCAL (git-fixes).
Browse files Browse the repository at this point in the history
suse-commit: 69ad8b5d6e5fe96d94ebcab062470c4132a3e356
  • Loading branch information
neilbrown committed Feb 15, 2022
1 parent 829f18d commit 2f9984e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions net/sunrpc/xprtsock.c
Original file line number Diff line number Diff line change
Expand Up @@ -1740,31 +1740,31 @@ static void xs_local_set_port(struct rpc_xprt *xprt, unsigned short port)
}

#ifdef CONFIG_DEBUG_LOCK_ALLOC
static struct lock_class_key xs_key[2];
static struct lock_class_key xs_slock_key[2];
static struct lock_class_key xs_key[3];
static struct lock_class_key xs_slock_key[3];

static inline void xs_reclassify_socketu(struct socket *sock)
{
struct sock *sk = sock->sk;

sock_lock_init_class_and_name(sk, "slock-AF_LOCAL-RPC",
&xs_slock_key[1], "sk_lock-AF_LOCAL-RPC", &xs_key[1]);
&xs_slock_key[0], "sk_lock-AF_LOCAL-RPC", &xs_key[0]);
}

static inline void xs_reclassify_socket4(struct socket *sock)
{
struct sock *sk = sock->sk;

sock_lock_init_class_and_name(sk, "slock-AF_INET-RPC",
&xs_slock_key[0], "sk_lock-AF_INET-RPC", &xs_key[0]);
&xs_slock_key[1], "sk_lock-AF_INET-RPC", &xs_key[1]);
}

static inline void xs_reclassify_socket6(struct socket *sock)
{
struct sock *sk = sock->sk;

sock_lock_init_class_and_name(sk, "slock-AF_INET6-RPC",
&xs_slock_key[1], "sk_lock-AF_INET6-RPC", &xs_key[1]);
&xs_slock_key[2], "sk_lock-AF_INET6-RPC", &xs_key[2]);
}

static inline void xs_reclassify_socket(int family, struct socket *sock)
Expand Down

0 comments on commit 2f9984e

Please sign in to comment.