Re: [LOCKDEP BUG][2.6.36-rc1] xt_info_wrlock?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Peter Zijlstra
Date: Monday, August 16, 2010 - 1:04 pm

On Mon, 2010-08-16 at 12:44 -0700, David Miller wrote:

Something like the below will keep lockdep coverage, still going back to
RCU sounds like the best option.

---
 include/linux/netfilter/x_tables.h |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/include/linux/netfilter/x_tables.h b/include/linux/netfilter/x_tables.h
index 24e5d01..a195feb 100644
--- a/include/linux/netfilter/x_tables.h
+++ b/include/linux/netfilter/x_tables.h
@@ -511,12 +511,21 @@ static inline void xt_info_rdunlock_bh(void)
  */
 static inline void xt_info_wrlock(unsigned int cpu)
 {
+#ifdef CONFIG_PROVE_LOCKING
+	/*
+	 * XXX foo
+	 */
+	local_bh_disable();
+#endif
 	spin_lock(&per_cpu(xt_info_locks, cpu).lock);
 }
 
 static inline void xt_info_wrunlock(unsigned int cpu)
 {
 	spin_unlock(&per_cpu(xt_info_locks, cpu).lock);
+#ifdef CONFIG_PROVE_LOCKING
+	local_bh_enable();
+#endif
 }
 
 /*

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[LOCKDEP BUG][2.6.36-rc1] xt_info_wrlock?, Steven Rostedt, (Mon Aug 16, 10:07 am)
Re: [LOCKDEP BUG][2.6.36-rc1] xt_info_wrlock?, Eric Dumazet, (Mon Aug 16, 10:31 am)
Re: [LOCKDEP BUG][2.6.36-rc1] xt_info_wrlock?, Steven Rostedt, (Mon Aug 16, 10:55 am)
Re: [LOCKDEP BUG][2.6.36-rc1] xt_info_wrlock?, Steven Rostedt, (Mon Aug 16, 11:16 am)
Re: [LOCKDEP BUG][2.6.36-rc1] xt_info_wrlock?, Peter Zijlstra, (Mon Aug 16, 11:36 am)
Re: [LOCKDEP BUG][2.6.36-rc1] xt_info_wrlock?, Eric Dumazet, (Mon Aug 16, 11:48 am)
Re: [LOCKDEP BUG][2.6.36-rc1] xt_info_wrlock?, Eric Dumazet, (Mon Aug 16, 11:48 am)
Re: [LOCKDEP BUG][2.6.36-rc1] xt_info_wrlock?, Peter Zijlstra, (Mon Aug 16, 12:16 pm)
Re: [LOCKDEP BUG][2.6.36-rc1] xt_info_wrlock?, Eric Dumazet, (Mon Aug 16, 12:35 pm)
Re: [LOCKDEP BUG][2.6.36-rc1] xt_info_wrlock?, David Miller, (Mon Aug 16, 12:44 pm)
Re: [LOCKDEP BUG][2.6.36-rc1] xt_info_wrlock?, Peter Zijlstra, (Mon Aug 16, 1:01 pm)
Re: [LOCKDEP BUG][2.6.36-rc1] xt_info_wrlock?, Peter Zijlstra, (Mon Aug 16, 1:04 pm)
Re: [LOCKDEP BUG][2.6.36-rc1] xt_info_wrlock?, Eric Dumazet, (Mon Aug 16, 1:17 pm)