aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux
diff options
context:
space:
mode:
Diffstat (limited to 'security/selinux')
-rw-r--r--security/selinux/hooks.c7
-rw-r--r--security/selinux/include/xfrm.h5
-rw-r--r--security/selinux/selinuxfs.c2
3 files changed, 9 insertions, 5 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index b03b0776955a..336f0a04450e 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -106,7 +106,7 @@ int selinux_enforcing;
106static int __init enforcing_setup(char *str) 106static int __init enforcing_setup(char *str)
107{ 107{
108 unsigned long enforcing; 108 unsigned long enforcing;
109 if (!strict_strtoul(str, 0, &enforcing)) 109 if (!kstrtoul(str, 0, &enforcing))
110 selinux_enforcing = enforcing ? 1 : 0; 110 selinux_enforcing = enforcing ? 1 : 0;
111 return 1; 111 return 1;
112} 112}
@@ -119,7 +119,7 @@ int selinux_enabled = CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE;
119static int __init selinux_enabled_setup(char *str) 119static int __init selinux_enabled_setup(char *str)
120{ 120{
121 unsigned long enabled; 121 unsigned long enabled;
122 if (!strict_strtoul(str, 0, &enabled)) 122 if (!kstrtoul(str, 0, &enabled))
123 selinux_enabled = enabled ? 1 : 0; 123 selinux_enabled = enabled ? 1 : 0;
124 return 1; 124 return 1;
125} 125}
@@ -3320,6 +3320,9 @@ static int selinux_file_fcntl(struct file *file, unsigned int cmd,
3320 case F_GETLK: 3320 case F_GETLK:
3321 case F_SETLK: 3321 case F_SETLK:
3322 case F_SETLKW: 3322 case F_SETLKW:
3323 case F_OFD_GETLK:
3324 case F_OFD_SETLK:
3325 case F_OFD_SETLKW:
3323#if BITS_PER_LONG == 32 3326#if BITS_PER_LONG == 32
3324 case F_GETLK64: 3327 case F_GETLK64:
3325 case F_SETLK64: 3328 case F_SETLK64:
diff --git a/security/selinux/include/xfrm.h b/security/selinux/include/xfrm.h
index 9f0584710c85..1450f85b946d 100644
--- a/security/selinux/include/xfrm.h
+++ b/security/selinux/include/xfrm.h
@@ -46,10 +46,11 @@ static inline void selinux_xfrm_notify_policyload(void)
46{ 46{
47 struct net *net; 47 struct net *net;
48 48
49 atomic_inc(&flow_cache_genid);
50 rtnl_lock(); 49 rtnl_lock();
51 for_each_net(net) 50 for_each_net(net) {
51 atomic_inc(&net->xfrm.flow_cache_genid);
52 rt_genid_bump_all(net); 52 rt_genid_bump_all(net);
53 }
53 rtnl_unlock(); 54 rtnl_unlock();
54} 55}
55#else 56#else
diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c
index d60c0ee66387..c71737f6d1cc 100644
--- a/security/selinux/selinuxfs.c
+++ b/security/selinux/selinuxfs.c
@@ -54,7 +54,7 @@ unsigned int selinux_checkreqprot = CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE;
54static int __init checkreqprot_setup(char *str) 54static int __init checkreqprot_setup(char *str)
55{ 55{
56 unsigned long checkreqprot; 56 unsigned long checkreqprot;
57 if (!strict_strtoul(str, 0, &checkreqprot)) 57 if (!kstrtoul(str, 0, &checkreqprot))
58 selinux_checkreqprot = checkreqprot ? 1 : 0; 58 selinux_checkreqprot = checkreqprot ? 1 : 0;
59 return 1; 59 return 1;
60} 60}