summaryrefslogtreecommitdiffstats
path: root/include/linux/rtnetlink.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/rtnetlink.h')
-rw-r--r--include/linux/rtnetlink.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
index 263690d..68c436b 100644
--- a/include/linux/rtnetlink.h
+++ b/include/linux/rtnetlink.h
@@ -760,6 +760,15 @@ extern int lockdep_rtnl_is_held(void);
rcu_dereference_check(p, rcu_read_lock_held() || \
lockdep_rtnl_is_held())
+/**
+ * rtnl_dereference - rcu_dereference with debug checking
+ * @p: The pointer to read, prior to dereferencing
+ *
+ * Do an rcu_dereference(p), but check caller holds RTNL
+ */
+#define rtnl_dereference(p) \
+ rcu_dereference_check(p, lockdep_rtnl_is_held())
+
extern void rtnetlink_init(void);
extern void __rtnl_unlock(void);
OpenPOWER on IntegriCloud