[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-backports
Subject:    [PATCH 2/3] backports: add rcu_dereference_rtnl
From:       Hauke Mehrtens <hauke () hauke-m ! de>
Date:       2013-05-31 19:15:23
Message-ID: 1370027724-22627-2-git-send-email-hauke () hauke-m ! de
[Download RAW message or body]

Add backport for rcu_dereference_rtnl()

Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
 backport/backport-include/linux/rtnetlink.h |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/backport/backport-include/linux/rtnetlink.h b/backport/backport-include/linux/rtnetlink.h
index 56ba9f6..81540a3 100644
--- a/backport/backport-include/linux/rtnetlink.h
+++ b/backport/backport-include/linux/rtnetlink.h
@@ -7,6 +7,12 @@
         rcu_dereference_protected(p, lockdep_rtnl_is_held())
 #endif
 
+#ifndef rcu_dereference_rtnl
+#define rcu_dereference_rtnl(p)					\
+	rcu_dereference_check(p, rcu_read_lock_held() ||	\
+				 lockdep_rtnl_is_held())
+#endif
+
 #if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,34)
 #ifdef CONFIG_PROVE_LOCKING
 /*
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe backports" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic