selinux: checkreqprot is deprecated, add some ssleep() discomfort
[sfrench/cifs-2.6.git] / security / selinux / include / security.h
index ace4bd13e8084502a844c119737bde7ed102627f..f7e6be63adfb9194485a41a2570d9a030211a004 100644 (file)
@@ -16,6 +16,8 @@
 #include <linux/rcupdate.h>
 #include <linux/refcount.h>
 #include <linux/workqueue.h>
+#include <linux/delay.h>
+#include <linux/printk.h>
 #include "flask.h"
 #include "policycap.h"
 
@@ -150,6 +152,10 @@ static inline bool checkreqprot_get(const struct selinux_state *state)
 
 static inline void checkreqprot_set(struct selinux_state *state, bool value)
 {
+       if (value) {
+               pr_err("SELinux: https://github.com/SELinuxProject/selinux-kernel/wiki/DEPRECATE-checkreqprot\n");
+               ssleep(5);
+       }
        WRITE_ONCE(state->checkreqprot, value);
 }