aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/skmsg.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/skmsg.h')
-rw-r--r--include/linux/skmsg.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/skmsg.h b/include/linux/skmsg.h
index 50ced8aba9db..e4b3fb4bb77c 100644
--- a/include/linux/skmsg.h
+++ b/include/linux/skmsg.h
@@ -354,7 +354,13 @@ static inline void sk_psock_restore_proto(struct sock *sk,
354 sk->sk_write_space = psock->saved_write_space; 354 sk->sk_write_space = psock->saved_write_space;
355 355
356 if (psock->sk_proto) { 356 if (psock->sk_proto) {
357 sk->sk_prot = psock->sk_proto; 357 struct inet_connection_sock *icsk = inet_csk(sk);
358 bool has_ulp = !!icsk->icsk_ulp_data;
359
360 if (has_ulp)
361 tcp_update_ulp(sk, psock->sk_proto);
362 else
363 sk->sk_prot = psock->sk_proto;
358 psock->sk_proto = NULL; 364 psock->sk_proto = NULL;
359 } 365 }
360} 366}