projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
datapath: Add genl_dereference() and use it.
[openvswitch]
/
datapath
/
linux
/
compat
/
include
/
linux
/
genetlink.h
diff --git
a/datapath/linux/compat/include/linux/genetlink.h
b/datapath/linux/compat/include/linux/genetlink.h
index e45d08546ef66186b68dd407a0aa69a2449489de..f7b96d967c6f53c60c68fe004bda84bd147e21bb 100644
(file)
--- a/
datapath/linux/compat/include/linux/genetlink.h
+++ b/
datapath/linux/compat/include/linux/genetlink.h
@@
-12,4
+12,12
@@
static inline int lockdep_genl_is_held(void)
}
#endif
}
#endif
+/* This is also not upstream yet. */
+#ifndef genl_dereference
+#include <linux/rcupdate.h>
+
+#define genl_dereference(p) \
+ rcu_dereference_protected(p, lockdep_genl_is_held())
+#endif
+
#endif /* linux/genetlink.h wrapper */
#endif /* linux/genetlink.h wrapper */