From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net] inet: make sure to grab rcu_read_lock before using ireq->ireq_opt Date: Tue, 02 Oct 2018 15:52:36 -0700 (PDT) Message-ID: <20181002.155236.1859184270596107590.davem@davemloft.net> References: <20181002193505.48167-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 ([23.128.96.9]:51194 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726993AbeJCFiV (ORCPT ); Wed, 3 Oct 2018 01:38:21 -0400 In-Reply-To: <20181002193505.48167-1-edumazet@google.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Eric Dumazet Date: Tue, 2 Oct 2018 12:35:05 -0700 > Timer handlers do not imply rcu_read_lock(), so my recent fix > triggered a LOCKDEP warning when SYNACK is retransmit. > > Lets add rcu_read_lock()/rcu_read_unlock() pairs around ireq->ireq_opt > usages instead of guessing what is done by callers, since it is > not worth the pain. > > Get rid of ireq_opt_deref() helper since it hides the logic > without real benefit, since it is now a standard rcu_dereference(). > > Fixes: 1ad98e9d1bdf ("tcp/dccp: fix lockdep issue when SYN is backlogged") > Signed-off-by: Eric Dumazet > Reported-by: Willem de Bruijn Applied, thanks Eric.