Revert "Fix mutex-lock-ordering"
This reverts commit e947d9aaab3f4633ce670dd56db21d1613244530.
Signed-off-by: Christoph Paasch <christoph.paasch@uclouvain.be>
Conflicts:
include/net/mptcp.h
diff --git a/include/net/mptcp.h b/include/net/mptcp.h
index df9e453..a395991 100644
--- a/include/net/mptcp.h
+++ b/include/net/mptcp.h
@@ -1078,15 +1078,6 @@
return sk->sk_family == AF_INET6 &&
ipv6_addr_type(&inet6_sk(sk)->saddr) == IPV6_ADDR_MAPPED;
}
-
-static inline void mptcp_lock_nested(struct sock *sk)
-{
-#ifdef CONFIG_DEBUG_LOCK_ALLOC
- mutex_lock_nest_lock(&tcp_sk(sk)->mpcb->mutex, &sk->sk_lock);
-#else
- mutex_lock(&tcp_sk(sk)->mpcb->mutex);
-#endif
-}
#else /* CONFIG_MPTCP */
#define mptcp_debug(fmt, args...) \
do { \
@@ -1262,7 +1253,6 @@
return 0;
}
static inline void mptcp_destroy_sock(struct sock *sk) {}
-static inline void mptcp_lock_nested(struct sock *sk) {}
#endif /* CONFIG_MPTCP */
#endif /* _MPTCP_H */
diff --git a/net/ipv4/inet_connection_sock.c b/net/ipv4/inet_connection_sock.c
index c202846..24bc47b 100644
--- a/net/ipv4/inet_connection_sock.c
+++ b/net/ipv4/inet_connection_sock.c
@@ -766,8 +766,7 @@
acc_req = req->dl_next;
if (is_meta_sk(child))
- mptcp_lock_nested(child);
-
+ mutex_lock(&tcp_sk(child)->mpcb->mutex);
local_bh_disable();
bh_lock_sock(child);
WARN_ON(sock_owned_by_user(child));