Skip to content

Commit 6cf9ff4

Browse files
dmantipovdavem330
authored andcommitted
net: smc: fix spurious error message from __sock_release()
Commit 67f562e ("net/smc: transfer fasync_list in case of fallback") leaves the socket's fasync list pointer within a container socket as well. When the latter is destroyed, '__sock_release()' warns about its non-empty fasync list, which is a dangling pointer to previously freed fasync list of an underlying TCP socket. Fix this spurious warning by nullifying fasync list of a container socket. Fixes: 67f562e ("net/smc: transfer fasync_list in case of fallback") Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent d9a31cd commit 6cf9ff4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/smc/af_smc.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -924,6 +924,7 @@ static int smc_switch_to_fallback(struct smc_sock *smc, int reason_code)
924924
smc->clcsock->file->private_data = smc->clcsock;
925925
smc->clcsock->wq.fasync_list =
926926
smc->sk.sk_socket->wq.fasync_list;
927+
smc->sk.sk_socket->wq.fasync_list = NULL;
927928

928929
/* There might be some wait entries remaining
929930
* in smc sk->sk_wq and they should be woken up

0 commit comments

Comments
 (0)