Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp2011779ybv; Fri, 21 Feb 2020 07:17:56 -0800 (PST) X-Google-Smtp-Source: APXvYqyBbLjLosYhliKUu6Lzn5Mm46jLy5M2UWCcf24TOlpa46oCtpnvU8zE94uCbj/saTn5X76i X-Received: by 2002:a05:6830:1219:: with SMTP id r25mr4341087otp.180.1582298276065; Fri, 21 Feb 2020 07:17:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582298276; cv=none; d=google.com; s=arc-20160816; b=AbeZ2KQpro4amlpWc+dmK+B3S+K9sWAIJk13mxTTF57bHZma2DsD0rvwW7VgGQIj4g /8k5zV2N5KyHOePmYolEUOR4Qn6p+YbmIqJ9ee2WAeNyX1VvHSuSso4rE09p23+V7Yv5 RKngWce2tt6J5CPT3KMrljhi00kTPJfMDzp5JMQOV9oUVZTYaxEgJ1JJnsuDi7VckpYf yfU/d8vEBbxsAyQF+8oFwJrSHXZC8LVrytuaxYiK/lWhPeYGwNMUt6g6Q8g/YSWujCgE SwatAWjoP5PKNOIwbMlip3vprLXeKiD4XKPnCnI0ZPwzQfKSNwX9OXJyYYop+FLvzdVj nPxw== 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=tt5oxns5lx1f646f1QThGbvv5Sl7/0SEXMWJEeaTqzA=; b=giQ3jV4yfd8ieRHgZxkeUiinlBVwVddS1b3FK+ogCMFxTr6lZq0jO14w3rctURthym CYryu12y42nn9RcvoBbnvxNHgc/1+muZnztiF7Kqs7FO5NR+SkP3ZkXgzEyoLL510Sv5 seUJQr2j2+6saX5Pa5hNHHyXYDVktpoxtTYtNuI411BNSf6pGcrnBiZ+i9XdSM52S26u 78VtYdoTq+cjK9iPxbV8qY/UA9kaeVQO5VfywbnOOzwOsaph8lOMlb4JSiu+Fb8I+qet R8ia4XjCaoNZDmIEPdPvmqUe2VNJkxEAyNJCqo9v27G/R/pkIsVP+np7qkWsWrpBFKvk Jr3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=XHqUsWyZ; 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 v21si1462764otj.282.2020.02.21.07.17.38; Fri, 21 Feb 2020 07:17:56 -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=XHqUsWyZ; 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 S1729068AbgBUPQ1 (ORCPT + 99 others); Fri, 21 Feb 2020 10:16:27 -0500 Received: from mail-pf1-f195.google.com ([209.85.210.195]:41025 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727053AbgBUPQ0 (ORCPT ); Fri, 21 Feb 2020 10:16:26 -0500 Received: by mail-pf1-f195.google.com with SMTP id j9so1360485pfa.8; Fri, 21 Feb 2020 07:16:26 -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=tt5oxns5lx1f646f1QThGbvv5Sl7/0SEXMWJEeaTqzA=; b=XHqUsWyZpog7dGkF2/1vy0XTPQVmrc3GfB3/7gzT7AU3Ppp54bRgKBWQQpv+YyAVRN jDMqH+xq/B+yeFSi3bYiI5FZNGGHqK1r8BV2ERyHgdHhpiDtRrQqVvZwvTfuFtru9nVj qI1rsAUke55VKP+GCASFz9QPRyXZi88rhE4eonRwFKX5c+tHUZmF4plFiYnLG1twO6Ey 5gYd8TzBIrgRhdlORR8VXXZH4ghI84aGmmCZZPfXxqBlDMCWfWUt/ldK26EhaK77/toL Act9AWx73QCjqqZswcrdKNb/fKAGr8OhCdHETSjBXF45dUAyf/cMMUEwKFVX00cZR9qN JA3A== 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=tt5oxns5lx1f646f1QThGbvv5Sl7/0SEXMWJEeaTqzA=; b=Q1vJMywX3nYNdkwFrSezoxNoWq5tGP56idpTEQ3sdxwQcO0/00RTue+GSmJDYoD3ve QureQxs0c6eYPAcqax2bbNy6O5umMcjvD9bTLyxeG0tZGNk9hNWkB2wh9XoWYk5Q0zCz lXlrbNepZqYw3zw//0eMHEMycb0Z1m10DX92lve3sKuyA91hKH9eWiRB7BuEMb0XgDti vBi92Mf9/7KYAmfEfALdnmXrWrvK6TuZQdFcc0ng3fMMb/YqLHyHsRCiHdoRsjI0bs6J R6HOrq8DkgtXZPzT+/72Md7aEN+U/rbLEkNw5m/HRsBG7mypykM3zNL84+kyNp2c8DIb 1F1Q== X-Gm-Message-State: APjAAAW+ZOXxiCrEyuyvcLMlpq0Qoq67QHWWyeOp+1nfYWKpjX8BTI5N 1c3EqaYaFKc2YCehfHuAUbHwTOcc81I= X-Received: by 2002:a63:5124:: with SMTP id f36mr1105111pgb.288.1582298186030; Fri, 21 Feb 2020 07:16:26 -0800 (PST) Received: from localhost.localdomain ([103.87.57.170]) by smtp.googlemail.com with ESMTPSA id q25sm3239490pfg.41.2020.02.21.07.16.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Feb 2020 07:16:25 -0800 (PST) From: Amol Grover To: Eric Dumazet , "David S . Miller" , Alexey Kuznetsov , Hideaki YOSHIFUJI , Jakub Kicinski Cc: linux-kernel@vger.kernel.org, linux-kernel-mentees@lists.linuxfoundation.org, Joel Fernandes , Madhuparna Bhowmik , "Paul E . McKenney" , netdev@vger.kernel.org, Amol Grover Subject: [PATCH] tcp, ulp: Pass lockdep expression to RCU lists Date: Fri, 21 Feb 2020 20:45:38 +0530 Message-Id: <20200221151537.12334-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 tcp_ulp_list is traversed using list_for_each_entry_rcu outside an RCU read-side critical section but under the protection of tcp_ulp_list_lock. Hence, add corresponding lockdep expression to silence false-positive warnings, and harden RCU lists.t Signed-off-by: Amol Grover --- net/ipv4/tcp_ulp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/net/ipv4/tcp_ulp.c b/net/ipv4/tcp_ulp.c index 38d3ad141161..b9e55759054e 100644 --- a/net/ipv4/tcp_ulp.c +++ b/net/ipv4/tcp_ulp.c @@ -22,7 +22,8 @@ static struct tcp_ulp_ops *tcp_ulp_find(const char *name) { struct tcp_ulp_ops *e; - list_for_each_entry_rcu(e, &tcp_ulp_list, list) { + list_for_each_entry_rcu(e, &tcp_ulp_list, list, + lockdep_is_held(&tcp_ulp_list_lock)) { if (strcmp(e->name, name) == 0) return e; } -- 2.24.1