From 0f0c6cf97b8881222966878a88d2d2e4e4587527 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Fri, 31 May 2013 21:15:23 +0200 Subject: [PATCH] backports: add rcu_dereference_rtnl Add backport for rcu_dereference_rtnl() Signed-off-by: Hauke Mehrtens Signed-off-by: Luis R. Rodriguez --- 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 56ba9f6a313a..81540a364562 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 /* -- 2.30.2