From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pablo Neira Ayuso Subject: Re: [PATCH net] netfilter: on sockopt() acquire sock lock only in the required scope Date: Wed, 31 Jan 2018 16:39:32 +0100 Message-ID: <20180131153932.xuujohoomcrmp4ch@salvia> References: <590fca0265dd06aa75e124fdbce29486b58a7b25.1517335086.git.pabeni@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: netdev@vger.kernel.org, "David S. Miller" , Florian Westphal , netfilter-devel@vger.kernel.org To: Paolo Abeni Return-path: Content-Disposition: inline In-Reply-To: <590fca0265dd06aa75e124fdbce29486b58a7b25.1517335086.git.pabeni@redhat.com> Sender: netfilter-devel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org On Tue, Jan 30, 2018 at 07:01:40PM +0100, Paolo Abeni wrote: > Syzbot reported several deadlocks in the netfilter area caused by > rtnl lock and socket lock being acquired with a different order on > different code paths, leading to backtraces like the following one: [...] > The problem, as Florian noted, is that nf_setsockopt() is always > called with the socket held, even if the lock itself is required only > for very tight scopes and only for some operation. Applied, thanks Paolo.