> > sk_lock-AF_INET->&smc->clcsock_release_lock > smc_sendmsg() calls lock_sock() to acquire sk_lock, then calls > smc_switch_to_fallback() which attempts to acquire mutex_lock(&smc->...). > > &smc->clcsock_release_lock->rtnl_mutex > smc_setsockopt() calls mutex_lock(&smc->...). smc->...->setsockopt() is > called, which calls nf_setsockopt() which attempts to acquire > rtnl_lock() in some nested call in start_sync_thread() in ip_vs_sync.c. > > FIX: > In smc_switch_to_fallback(), separate the logic into inline function > __smc_switch_to_fallback(). In smc_sendmsg(), lock ordering can be > modified and the functionality of smc_switch_to_fallback() is > encapsulated in the __smc_switch_to_fallback() function.