Skip to content
Commit e1bbdd57 authored by Ursula Braun's avatar Ursula Braun Committed by David S. Miller
Browse files

net/smc: reduce sock_put() for fallback sockets



smc_release() calls a sock_put() for smc fallback sockets to cover
the passive closing sock_hold() in __smc_connect() and
smc_tcp_listen_work(). This does not make sense for sockets in state
SMC_LISTEN and SMC_INIT.
An SMC socket stays in state SMC_INIT if connect fails. The sock_put
in smc_connect_abort() does not cover all failures. Move it into
smc_connect_decline_fallback().

Fixes: ee9dfbef ("net/smc: handle sockopts forcing fallback")
Reported-by: default avatar <syzbot+3a0748c8f2f210c0ef9b@syzkaller.appspotmail.com>
Reported-by: default avatar <syzbot+9e60d2428a42049a592a@syzkaller.appspotmail.com>
Signed-off-by: default avatarUrsula Braun <ubraun@linux.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 000244d3
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment