From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net 1/1] net/smc: reduce sock_put() for fallback sockets Date: Sat, 07 Jul 2018 20:25:54 +0900 (KST) Message-ID: <20180707.202554.176954772644288123.davem@davemloft.net> References: <20180705141530.72728-1-ubraun@linux.ibm.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, linux-s390@vger.kernel.org, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, raspl@linux.ibm.com, linux-kernel@vger.kernel.org, ebiggers3@gmail.com To: ubraun@linux.ibm.com Return-path: In-Reply-To: <20180705141530.72728-1-ubraun@linux.ibm.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org From: Ursula Braun Date: Thu, 5 Jul 2018 16:15:30 +0200 > 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: ee9dfbef02d18 ("net/smc: handle sockopts forcing fallback") > Reported-by: syzbot+3a0748c8f2f210c0ef9b@syzkaller.appspotmail.com > Reported-by: syzbot+9e60d2428a42049a592a@syzkaller.appspotmail.com > Signed-off-by: Ursula Braun Applied, thanks.