From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.3 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81FA7C28CBC for ; Sat, 9 May 2020 07:24:13 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5085524955 for ; Sat, 9 May 2020 07:24:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="toFHJ7qt" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5085524955 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-kernel-mentees-bounces@lists.linuxfoundation.org Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 2D10387938; Sat, 9 May 2020 07:24:13 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id XZTOK6s4yHOX; Sat, 9 May 2020 07:24:12 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by whitealder.osuosl.org (Postfix) with ESMTP id CFF6C87862; Sat, 9 May 2020 07:24:12 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id BC7D8C0889; Sat, 9 May 2020 07:24:12 +0000 (UTC) Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by lists.linuxfoundation.org (Postfix) with ESMTP id D0EEAC07FF for ; Sat, 9 May 2020 07:24:10 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id CD07887938 for ; Sat, 9 May 2020 07:24:10 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id FLPKIZ6JGjXk for ; Sat, 9 May 2020 07:24:10 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-pg1-f194.google.com (mail-pg1-f194.google.com [209.85.215.194]) by whitealder.osuosl.org (Postfix) with ESMTPS id 3E34787862 for ; Sat, 9 May 2020 07:24:10 +0000 (UTC) Received: by mail-pg1-f194.google.com with SMTP id a4so1991819pgc.0 for ; Sat, 09 May 2020 00:24:10 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=9hYMlHxQU9EhnNg/RTgwCsCYqoi4kN3olIEeJ3OkvPk=; b=toFHJ7qtvFR7dzF3OjoWHpTnMz2hSw7vehIHfwf2hCwwkiLguoTGUaaQyPygrhaQvA cNNF3HMgAU64obZSlo/Qbsp2Llv22owcs9QCBvxrwFjrecTpXPvrTzi2plEah/5zyNZE dAcfD6e5Mdi2rtYx8YiMdLBgb/c6Ihup0trgaXarr4Th6G1gaUV+Pls621KGL7tWdlYh Cr5bbih5uoIJGmuB0iMJjD7stWQczo1Ps+Xli8bU0glt01Zmgyyt6ZjTshxMle/haV7I W2NvGABs6rG0PR4bOLkj4HYOEzNWNtJu+ESTkGtZWLPpkQyntqA2qNK1LOEWZIE449QV hI5w== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=9hYMlHxQU9EhnNg/RTgwCsCYqoi4kN3olIEeJ3OkvPk=; b=ZJBUoHJK3/dg1uIOaWyPBK1xbgWoJNNnMKrXRCj8gfZUO26OP2SZicKQEFUDr4l17q 7xf0goaNbdzQtTvXaRCMKqx4iCGhMQVRFLbqwmtUDFwJns0epxq004i+6TndvpBAxtOu 5+sXDSyI1iQpQy56Iddo3wRuStrTh6u1qMZjyZuxxJLyYKMG8f//o8ayvjuRZED+WwSi OaAC8jcpc6UTnzVia/Ox/1bBau/vK+hX+IQixoWYIkXntpEqKYKa8Y5bIvw3terY90sq JtbjfT94mGivBACxteqmpbSlcFW8MPCmYz+b/sI5ataSeSRdtrEvTRKTxyzu+x7zfJkV rkrw== X-Gm-Message-State: AGi0PubXvOUhoFozycfo7BXRFwn0/MrqTDcUdanesUCRgGPS8sNEFfaN owGR5bdYXjNLoyUyHjpkRG8= X-Google-Smtp-Source: APiQypLeSUYISLie9vr9evfLKogEfTs2rJMiVRXqzJqa7GYRnCG/v53OoKFMppNGjJ0uC767/mYgiw== X-Received: by 2002:aa7:91da:: with SMTP id z26mr7135697pfa.18.1589009049866; Sat, 09 May 2020 00:24:09 -0700 (PDT) Received: from localhost.localdomain ([103.87.56.89]) by smtp.googlemail.com with ESMTPSA id f74sm14024249pje.3.2020.05.09.00.24.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 May 2020 00:24:09 -0700 (PDT) From: Amol Grover To: "David S . Miller" , Alexey Kuznetsov , Hideaki YOSHIFUJI , Jakub Kicinski Date: Sat, 9 May 2020 12:52:44 +0530 Message-Id: <20200509072243.3141-2-frextrite@gmail.com> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200509072243.3141-1-frextrite@gmail.com> References: <20200509072243.3141-1-frextrite@gmail.com> MIME-Version: 1.0 Cc: "Paul E . McKenney" , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Madhuparna Bhowmik , Joel Fernandes , linux-kernel-mentees@lists.linuxfoundation.org Subject: [Linux-kernel-mentees] [PATCH net 2/2 RESEND] ipmr: Add lockdep expression to ipmr_for_each_table macro X-BeenThere: linux-kernel-mentees@lists.linuxfoundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-kernel-mentees-bounces@lists.linuxfoundation.org Sender: "Linux-kernel-mentees" ipmr_for_each_table() uses list_for_each_entry_rcu() for traversing outside of an RCU read-side critical section but under the protection of pernet_ops_rwsem. Hence add the corresponding lockdep expression to silence the following false-positive warning at boot: [ 0.645292] ============================= [ 0.645294] WARNING: suspicious RCU usage [ 0.645296] 5.5.4-stable #17 Not tainted [ 0.645297] ----------------------------- [ 0.645299] net/ipv4/ipmr.c:136 RCU-list traversed in non-reader section!! Signed-off-by: Amol Grover --- net/ipv4/ipmr.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/net/ipv4/ipmr.c b/net/ipv4/ipmr.c index 99c864eb6e34..950ffe9943da 100644 --- a/net/ipv4/ipmr.c +++ b/net/ipv4/ipmr.c @@ -109,9 +109,10 @@ static void mroute_clean_tables(struct mr_table *mrt, int flags); 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, \ - lockdep_rtnl_is_held()) +#define ipmr_for_each_table(mrt, net) \ + list_for_each_entry_rcu(mrt, &net->ipv4.mr_tables, list, \ + lockdep_rtnl_is_held() || \ + lockdep_is_held(&pernet_ops_rwsem)) static struct mr_table *ipmr_mr_table_iter(struct net *net, struct mr_table *mrt) -- 2.24.1 _______________________________________________ Linux-kernel-mentees mailing list Linux-kernel-mentees@lists.linuxfoundation.org https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees