Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp43025ybv; Fri, 21 Feb 2020 22:42:30 -0800 (PST) X-Google-Smtp-Source: APXvYqwO/s9uROKwyf+vwri1AcF/nCTa1mrftLySQUrg15xBmw/vwk5/Clevb1mtrxmh7Ok6gOa7 X-Received: by 2002:aca:d483:: with SMTP id l125mr5029555oig.124.1582353750261; Fri, 21 Feb 2020 22:42:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582353750; cv=none; d=google.com; s=arc-20160816; b=uGOWZTH9ivwn87Tej+0LxOW90p94oo9zw6jSbJ9xd/bkS05ukZlGupc10kJiEs2xT4 9/motRBOPnW8IXTPwajJSEtIKZqrn2uycHIxiDtzBMpeyi286r8syqvIyXPEbbcRshFB l8Dg0II7cE12MyOYv7sZcJsvZtN2Vq5y+2guldTC24hglOs5McAPO2ZFGVq2VF08y4Am khR7A6fewNn9twTUkxKnb/oKG6DfSehJOvt7FE0eCrJwpRC/c4wwvkDxL1SXBu1nLc0n Yp3WUOllY5FuVKztuxpRrVaWZ5GA8mOcXiuruJxEAMZmT6x3Iu947hpkJJPDL1tue+vx VIGQ== 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=djCteyRk9Z1v8P1zp0ub0z++pQIHl+8g/H7BCPbdYYhrM9KMIyHdRuy/ULA7v8dwz2 4TbovI5+ozUMXlRrgqXnpB8Jy46lH8WeHlTmrQjAyKigTCFqmjHeuqQJuxWS34ZbAjvc XT4E7n3uRww/5o0oU+esdT2cLhKeZ9X++RAIGL1dXzGA8Xa7OsV+TjfvLKAeEXoOXUUs oTmaXE7QUAT3D3T/3g+xFjRiIrtoK7zPWVXu3FxGno0VrHw/v91ptHBLFQMxn9tM7RPm N507fAsFyp2tJRSUcmPVvHFYTbonZPj69DHNuiomJxvu3yLFAZMlm3LSvYj/7XoLDgOS AbMQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FqRdB+56; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id w17si2651838oti.75.2020.02.21.22.42.16; Fri, 21 Feb 2020 22:42:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=FqRdB+56; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1727067AbgBVGmM (ORCPT + 99 others); Sat, 22 Feb 2020 01:42:12 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:44370 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726684AbgBVGmL (ORCPT ); Sat, 22 Feb 2020 01:42:11 -0500 Received: by mail-pf1-f195.google.com with SMTP id y5so2438060pfb.11; Fri, 21 Feb 2020 22:42:10 -0800 (PST) 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=FqRdB+56woJ+aqiLb2Cd0+dDu3Rnbt4s70LQ8+EbM106IRfJasluEqi2KryUpycnpa q46Pq0kb0YYO4m1Eo9qos5zs55uz/HYlEiPssXEfy33wSj5in56o1Mw0y49vLcmJS0SY KOTH5triN05mU1FQJYa8AJqZsid6Aonj/ufDlabhYcxsGlsumxffcFpMUDxWLnL7pr6X 0NyVv9KrUsBpfk2Ha2RdaczyDdXY9OoGLoN+oazdrGPJHmXtTPYKfgVT6KW0BL/sOZbz p53x+j7OfmyjxxNdXL1y2/YbXE19bh+x/h6q2IwQ6BwfPUi0JCZPZU8zOtK1LS1pEVFh rD1A== 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=h0EixJphnExxQ4PoJSWJmhHQhgw+8rhVGBhgjGeZdeEiTIljOAJ0fb0jkapeCsahhG QG7mI69bUtbnRg/WjznbQfpH3wB1GyfoI9ZHtW/klzZzrULSHETpt194CXP1aF9diRcH PbBa/akioy+y54839J74hL4v8/HVOeYWTfSAfCRazri4TMJdHd3TLR07MSwssFq4xFB/ hm+lxtk+uAa/atyPZzFJ0lQsh5EAC1457rLC0/MQz7YTrzdCT3uIJ46IKoJNIcXWTOpA hw3hZO7zh/zfPDVt0rVcRYYXdwlJmNglaHLpf86LYvmzjwWazBvfm1v0KtuvQEpa0VfL djnQ== X-Gm-Message-State: APjAAAXsmXovDhb8/O6A21lrPUskiW1w3XXG/EifURk7gE5aJE6xA8vy IFu4J3FaVPyAL+QDnFAmht8= X-Received: by 2002:a65:5a42:: with SMTP id z2mr1036184pgs.213.1582353729466; Fri, 21 Feb 2020 22:42:09 -0800 (PST) Received: from localhost.localdomain ([103.87.57.201]) by smtp.googlemail.com with ESMTPSA id k5sm4455071pju.29.2020.02.21.22.42.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Feb 2020 22:42:08 -0800 (PST) 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 1/2] ipmr: Fix RCU list debugging warning Date: Sat, 22 Feb 2020 12:08:35 +0530 Message-Id: <20200222063835.14328-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