mirror of
https://github.com/hardkernel/linux.git
synced 2026-03-25 03:50:24 +09:00
Revert "mptcp: fix lockless access in subflow ULP diag"
This reverts commit 7d6e8d7ee1 which is
commit b8adb69a7d29c2d33eb327bca66476fb6066516b upstream.
It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.
Bug: 161946584
Change-Id: I8d0ac023a1d1b06f07cdacdb5f60fb52e7ad782e
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
@@ -2233,7 +2233,7 @@ struct tcp_ulp_ops {
|
||||
/* cleanup ulp */
|
||||
void (*release)(struct sock *sk);
|
||||
/* diagnostic */
|
||||
int (*get_info)(struct sock *sk, struct sk_buff *skb);
|
||||
int (*get_info)(const struct sock *sk, struct sk_buff *skb);
|
||||
size_t (*get_info_size)(const struct sock *sk);
|
||||
/* clone ulp */
|
||||
void (*clone)(const struct request_sock *req, struct sock *newsk,
|
||||
|
||||
@@ -13,19 +13,17 @@
|
||||
#include <uapi/linux/mptcp.h>
|
||||
#include "protocol.h"
|
||||
|
||||
static int subflow_get_info(struct sock *sk, struct sk_buff *skb)
|
||||
static int subflow_get_info(const struct sock *sk, struct sk_buff *skb)
|
||||
{
|
||||
struct mptcp_subflow_context *sf;
|
||||
struct nlattr *start;
|
||||
u32 flags = 0;
|
||||
bool slow;
|
||||
int err;
|
||||
|
||||
start = nla_nest_start_noflag(skb, INET_ULP_INFO_MPTCP);
|
||||
if (!start)
|
||||
return -EMSGSIZE;
|
||||
|
||||
slow = lock_sock_fast(sk);
|
||||
rcu_read_lock();
|
||||
sf = rcu_dereference(inet_csk(sk)->icsk_ulp_data);
|
||||
if (!sf) {
|
||||
@@ -71,13 +69,11 @@ static int subflow_get_info(struct sock *sk, struct sk_buff *skb)
|
||||
}
|
||||
|
||||
rcu_read_unlock();
|
||||
unlock_sock_fast(sk, slow);
|
||||
nla_nest_end(skb, start);
|
||||
return 0;
|
||||
|
||||
nla_failure:
|
||||
rcu_read_unlock();
|
||||
unlock_sock_fast(sk, slow);
|
||||
nla_nest_cancel(skb, start);
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -805,7 +805,7 @@ static void tls_update(struct sock *sk, struct proto *p,
|
||||
}
|
||||
}
|
||||
|
||||
static int tls_get_info(struct sock *sk, struct sk_buff *skb)
|
||||
static int tls_get_info(const struct sock *sk, struct sk_buff *skb)
|
||||
{
|
||||
u16 version, cipher_type;
|
||||
struct tls_context *ctx;
|
||||
|
||||
Reference in New Issue
Block a user