Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp213831ybk; Sat, 9 May 2020 00:25:52 -0700 (PDT) X-Google-Smtp-Source: APiQypJTkJAjJAX33RvbEHWb7GlEU/RjVHypKKFgTnryiSplRsQUM95I220KnoWezOkHzQ0OhFjJ X-Received: by 2002:a17:906:d14e:: with SMTP id br14mr3458674ejb.350.1589009152528; Sat, 09 May 2020 00:25:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589009152; cv=none; d=google.com; s=arc-20160816; b=NGOQe8NQygi/IJ6SG8d8h7Co55ObGCXJciVI20ghbeMa97PEl+xrFH4xJLHqouJr01 ZPZ1el93l8lPhV8oVr13QFXxDRnV6xQltlJ2uH3UlNXE5PUVtwQ1jVIOCORpknmz/yAc 74GSuFL/ACoD3N7A16S/s69GBkRUDL8c6pZka89xUQYCNBsmCawoSTYQyDDoYVQJiHfD J+urvAvlbvDdFaGsuz2f3rPGsDWiV+RXOyxd4dIUJwwYoBVm8u7vTPgHPOPSggr3XXkF zQoy7+PrXTCaB2GuETMwHEjqveYeL68t+gnYsP4yK2FFYyXGY2Dc/MNdCRz7+tgquEJc mumw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=O6NOWgkJuVNBzcRIWQKK+1L2R6ELyCXl3BZEpc2cyyg=; b=WLLUNf+JrVbKvZODUPR6f+CbGm7zPZ5DEKdlv3d1Tv/YYDrYLEPZhhIUJZQ1L3OQUI CH/8qhMvxK+7hFvnSgdOpiwyOZiT0LGIUNCfgpb4/m+InuqOSjIrA7LxJ6luwV8hL/Gc NbY8zmvx5o3Z+dSMo/2B7FqfOCW4VOqiCCERLQyJZFwv8hXs4EQlTKduqLXwCCGbgNnN 9LQYumtPVq4v/gdHTxvxD307+VE7MBUj/CA5n9S50yF4Dgik0QXzuZ2mU8/QUI7B38d1 SdMNM+CibLEFLI/DP0N2zlrSoF9bWRMylFIztBT0ICOQRmC62JuQ4haPfKQBBzHSjPCg I+bA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KUc+DAyx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j6si2220196edd.521.2020.05.09.00.25.28; Sat, 09 May 2020 00:25:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=KUc+DAyx; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728879AbgEIHYH (ORCPT + 99 others); Sat, 9 May 2020 03:24:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725822AbgEIHYG (ORCPT ); Sat, 9 May 2020 03:24:06 -0400 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C174EC061A0C; Sat, 9 May 2020 00:24:06 -0700 (PDT) Received: by mail-pg1-x544.google.com with SMTP id n11so1971073pgl.9; Sat, 09 May 2020 00:24:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=O6NOWgkJuVNBzcRIWQKK+1L2R6ELyCXl3BZEpc2cyyg=; b=KUc+DAyxbo/FIS+4ZMWHTtwo6Scti9M6yahWtKDsNxEMlPDPUR2gzIMoGEdEJszrYh yTljj1+PVG4Fy6LZ9x2kjiHQnC2qaotowIAdSHDX9LBsHeBkobPRtDapevkpz/D47TKt BR+X3l9qhCILE3KscM+h8IXp2Rrug8V+6hjbFY8O9s2D0ROHxnLLLlRDXM0k4X5OqYOX fp1LQgIGNHScNVR9h6q2t0tvkeiAjw61Rm+/vdQhKpluCNGdrDoQjZgJpsopz2L5Zrk/ Ddfxg1DflK9NwFWtiA0KDnOGZIiNN/MBy3m0zx+tYPSMiP7YKzgdy9YSg8UOqo0gdN2L PzZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=O6NOWgkJuVNBzcRIWQKK+1L2R6ELyCXl3BZEpc2cyyg=; b=lGNzmU4R2IhaVTub2SG/x9EWAEIuRNZR9yLIIYHM/eWBQ665Fh7H2FsT7ugsT4snAw MjQQtqyQiuo+aXQFBJQT53FORfIUXm/sFgMiW7oQLohg+eN+3l77Q12PqhLq2z0LBXz1 0Xr5TZxBrx/ANpa9rdlg8gg+a3KF9UAeLs+hCSAGqTaB6hYFtpEhviPk+cwG6akDGxgG t20gSqcL5dY3vwGYzmJIU+ab/Ia1OdglAATY3gn9q/dXHvnUGEgNPwnbL4dU1v9Zc4SK 24b1FvL8r5KJOkGn+Eemjp0Ojp52zvpHrMEUeUEZzXQ1kmYrdBHkObXuyr3k4BHiknt1 rcXw== X-Gm-Message-State: AGi0PuYzqGo2qvRq0NQIsiAZ5K/HQGVgcAXhlbDHwQswp+YvhkmHjrG5 lYweykLiUBWT2pKtz+0tSAo= X-Received: by 2002:aa7:9148:: with SMTP id 8mr7084252pfi.154.1589009046017; Sat, 09 May 2020 00:24:06 -0700 (PDT) Received: from localhost.localdomain ([103.87.56.89]) by smtp.googlemail.com with ESMTPSA id f74sm14024249pje.3.2020.05.09.00.24.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 May 2020 00:24:05 -0700 (PDT) From: Amol Grover To: "David S . Miller" , Alexey Kuznetsov , Hideaki YOSHIFUJI , Jakub Kicinski Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org, Joel Fernandes , Madhuparna Bhowmik , "Paul E . McKenney" , Amol Grover Subject: [PATCH net 1/2 RESEND] ipmr: Fix RCU list debugging warning Date: Sat, 9 May 2020 12:52:43 +0530 Message-Id: <20200509072243.3141-1-frextrite@gmail.com> X-Mailer: git-send-email 2.24.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ipmr_for_each_table() macro uses list_for_each_entry_rcu() for traversing outside of an RCU read side critical section but under the protection of rtnl_mutex. Hence, add the corresponding lockdep expression to silence the following false-positive warning at boot: [ 4.319347] ============================= [ 4.319349] WARNING: suspicious RCU usage [ 4.319351] 5.5.4-stable #17 Tainted: G E [ 4.319352] ----------------------------- [ 4.319354] net/ipv4/ipmr.c:1757 RCU-list traversed in non-reader section!! Signed-off-by: Amol Grover --- net/ipv4/ipmr.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index 6e68def66822..99c864eb6e34 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c @@ -110,7 +110,8 @@ static void ipmr_expire_process(struct timer_list *t); #ifdef CONFIG_IP_MROUTE_MULTIPLE_TABLES #define ipmr_for_each_table(mrt, net) \ - list_for_each_entry_rcu(mrt, &net->ipv4.mr_tables, list) + list_for_each_entry_rcu(mrt, &net->ipv4.mr_tables, list, \ + lockdep_rtnl_is_held()) static struct mr_table *ipmr_mr_table_iter(struct net *net, struct mr_table *mrt) -- 2.24.1