From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net-next] ipv6: frags: fix a lockdep false positive Date: Wed, 18 Apr 2018 23:20:16 -0400 (EDT) Message-ID: <20180418.232016.1910578116691581991.davem@davemloft.net> References: <20180418011144.71697-1-edumazet@google.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, eric.dumazet@gmail.com To: edumazet@google.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:52164 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752504AbeDSDUT (ORCPT ); Wed, 18 Apr 2018 23:20:19 -0400 In-Reply-To: <20180418011144.71697-1-edumazet@google.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Eric Dumazet Date: Tue, 17 Apr 2018 18:11:44 -0700 > lockdep does not know that the locks used by IPv4 defrag > and IPv6 reassembly units are of different classes. > > It complains because of following chains : > > 1) sch_direct_xmit() (lock txq->_xmit_lock) > dev_hard_start_xmit() > xmit_one() > dev_queue_xmit_nit() > packet_rcv_fanout() > ip_check_defrag() > ip_defrag() > spin_lock() (lock frag queue spinlock) > > 2) ip6_input_finish() > ipv6_frag_rcv() (lock frag queue spinlock) > ip6_frag_queue() > icmpv6_param_prob() (lock txq->_xmit_lock at some point) > > We could add lockdep annotations, but we also can make sure IPv6 > calls icmpv6_param_prob() only after the release of the frag queue spinlock, > since this naturally makes frag queue spinlock a leaf in lock hierarchy. > > Signed-off-by: Eric Dumazet > --- > Note do David: I chose net-next because of recent changes in net-next, > and because it is a false positive, but can respin for net tree > if you prefer. Thanks ! Yeah I think net-next is fine for this. Applied, thanks.