Skip to content

Commit 67f562e

Browse files
Ursula Braundavem330
authored andcommitted
net/smc: transfer fasync_list in case of fallback
SMC does not work together with FASTOPEN. If sendmsg() is called with flag MSG_FASTOPEN in SMC_INIT state, the SMC-socket switches to fallback mode. To handle the previous ioctl FIOASYNC call correctly in this case, it is necessary to transfer the socket wait queue fasync_list to the internal TCP socket. Reported-by: [email protected] Fixes: ee9dfbe ("net/smc: handle sockopts forcing fallback") Signed-off-by: Ursula Braun <[email protected]> Signed-off-by: Karsten Graul <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent dc221a2 commit 67f562e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

net/smc/af_smc.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,8 @@ static void smc_switch_to_fallback(struct smc_sock *smc)
470470
if (smc->sk.sk_socket && smc->sk.sk_socket->file) {
471471
smc->clcsock->file = smc->sk.sk_socket->file;
472472
smc->clcsock->file->private_data = smc->clcsock;
473+
smc->clcsock->wq.fasync_list =
474+
smc->sk.sk_socket->wq.fasync_list;
473475
}
474476
}
475477

0 commit comments

Comments
 (0)