Skip to content
Commit 75c1edf2 authored by liuyacan's avatar liuyacan Committed by David S. Miller
Browse files

net/smc: postpone sk_refcnt increment in connect()

Same trigger condition as commit 86434744. When setsockopt runs
in parallel to a connect(), and switch the socket into fallback
mode. Then the sk_refcnt is incremented in smc_connect(), but
its state stay in SMC_INIT (NOT SMC_ACTIVE). This cause the
corresponding sk_refcnt decrement in __smc_release() will not be
performed.

Fixes: 86434744

 ("net/smc: add fallback check to connect()")
Signed-off-by: default avatarliuyacan <liuyacan@corp.netease.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0a3ad7d3
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