Skip to content

Commit 7ab4a7c

Browse files
Li Xiasongkuba-moo
authored andcommitted
MPTCP: fix lock class name family in pm_nl_create_listen_socket
In mptcp_pm_nl_create_listen_socket(), use entry->addr.family instead of sk->sk_family for lock class setup. The 'sk' parameter is a netlink socket, not the MPTCP subflow socket being created. Fixes: cee4034 ("mptcp: fix lockdep false positive in mptcp_pm_nl_create_listen_socket()") Signed-off-by: Li Xiasong <[email protected]> Reviewed-by: Matthieu Baerts (NGI0) <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 614aefe commit 7ab4a7c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

net/mptcp/pm_kernel.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -838,7 +838,7 @@ static struct lock_class_key mptcp_keys[2];
838838
static int mptcp_pm_nl_create_listen_socket(struct sock *sk,
839839
struct mptcp_pm_addr_entry *entry)
840840
{
841-
bool is_ipv6 = sk->sk_family == AF_INET6;
841+
bool is_ipv6 = entry->addr.family == AF_INET6;
842842
int addrlen = sizeof(struct sockaddr_in);
843843
struct sockaddr_storage addr;
844844
struct sock *newsk, *ssk;

0 commit comments

Comments
 (0)