[PATCH] backports: add lockdep_rtnl_is_held() for < 3.13 without CONFIG_PROVE_LOCKING

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Luca Coelho <luciano.coelho@xxxxxxxxx>

In kernels earlier than 3.13, lockdep_rtnl_is_held() is only declared
in rtnetlink.h when CONFIG_PROVE_LOCKING is not set.  Backport this
function if that's the case.

Signed-off-by: Luca Coelho <luciano.coelho@xxxxxxxxx>
---
 backport/backport-include/linux/rtnetlink.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/backport/backport-include/linux/rtnetlink.h b/backport/backport-include/linux/rtnetlink.h
index 9b68be820049..59beffa8316a 100644
--- a/backport/backport-include/linux/rtnetlink.h
+++ b/backport/backport-include/linux/rtnetlink.h
@@ -18,4 +18,12 @@
 	ndo_dflt_fdb_add(ndm, tb, dev, addr, flags)
 #endif
 
+#if LINUX_VERSION_IS_LESS(3,13,0) &&		\
+	!defined(CONFIG_PROVE_LOCKING)
+static inline bool lockdep_rtnl_is_held(void)
+{
+	return true;
+}
+#endif
+
 #endif /* __BACKPORT_LINUX_RTNETLINK_H */
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe backports" in



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux