[kernel/f13/master] Resoves bz 642905
Neil Horman
nhorman at fedoraproject.org
Thu Oct 14 18:33:22 UTC 2010
commit ab959db97c284c21ce825b2e39952fec7370be69
Author: Neil Horman <nhorman at shamino.rdu.redhat.com>
Date: Thu Oct 14 14:33:04 2010 -0400
Resoves bz 642905
kernel.spec | 9 +++++++
linux-2.6-twsock-rcu-lockdep-warn.patch | 36 +++++++++++++++++++++++++++++++
2 files changed, 45 insertions(+), 0 deletions(-)
---
diff --git a/kernel.spec b/kernel.spec
index b2cefda..ac28c2f 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -825,6 +825,9 @@ Patch12590: sctp-do-not-reset-the-packet-during-sctp_packet_config.patch
#Bonding sysfs WARN_ON (bz 604630)
Patch12591: linux-2.6-bonding-sysfs-warning.patch
+#twsock rcu warning fix (bz 642905)
+Patch12592: linux-2.6-twsock-rcu-lockdep-warn.patch
+
%endif
BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root
@@ -1559,6 +1562,9 @@ ApplyPatch sctp-do-not-reset-the-packet-during-sctp_packet_config.patch
# BZ 604630
ApplyPatch linux-2.6-bonding-sysfs-warning.patch
+# BZ 642905
+ApplyPatch linux-2.6-twsock-rcu-lockdep-warn.patch
+
# END OF PATCH APPLICATIONS
%endif
@@ -2180,6 +2186,9 @@ fi
%changelog
+* Thu Oct 14 2010 Neil Horman <nhorman at redhat.com>
+- Fix rcu warning in twsock_net (bz 642905)
+
* Wed Oct 06 2010 Neil Horman <nhorman at redhat.com>
- Fix WARN_ON when you try to create an exiting bond in bond_masters
diff --git a/linux-2.6-twsock-rcu-lockdep-warn.patch b/linux-2.6-twsock-rcu-lockdep-warn.patch
new file mode 100644
index 0000000..5c105b9
--- /dev/null
+++ b/linux-2.6-twsock-rcu-lockdep-warn.patch
@@ -0,0 +1,36 @@
+commit 7ec75c582e639d956ce3afd499f67febe6f902a4
+Author: Paul E. McKenney <paulmck at linux.vnet.ibm.com>
+Date: Tue Apr 27 06:22:01 2010 +0000
+
+ net: suppress RCU lockdep false positive in twsk_net()
+
+ Calls to twsk_net() are in some cases protected by reference counting
+ as an alternative to RCU protection. Cases covered by reference counts
+ include __inet_twsk_kill(), inet_twsk_free(), inet_twdr_do_twkill_work(),
+ inet_twdr_twcal_tick(), and tcp_timewait_state_process(). RCU is used
+ by inet_twsk_purge(). Locking is used by established_get_first()
+ and established_get_next(). Finally, __inet_twsk_hashdance() is an
+ initialization case.
+
+ It appears to be non-trivial to locate the appropriate locks and
+ reference counts from within twsk_net(), so used rcu_dereference_raw().
+
+ Signed-off-by: Paul E. McKenney <paulmck at linux.vnet.ibm.com>
+ Acked-by: Eric Dumazet <eric.dumazet at gmail.com>
+ Signed-off-by: David S. Miller <davem at davemloft.net>
+
+diff --git a/include/net/inet_timewait_sock.h b/include/net/inet_timewait_sock.h
+index 79f67ea..a066fdd 100644
+--- a/include/net/inet_timewait_sock.h
++++ b/include/net/inet_timewait_sock.h
+@@ -224,7 +224,9 @@ static inline
+ struct net *twsk_net(const struct inet_timewait_sock *twsk)
+ {
+ #ifdef CONFIG_NET_NS
+- return rcu_dereference(twsk->tw_net);
++ return rcu_dereference_raw(twsk->tw_net); /* protected by locking, */
++ /* reference counting, */
++ /* initialization, or RCU. */
+ #else
+ return &init_net;
+ #endif
More information about the scm-commits
mailing list