aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/selinuxfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'security/selinux/selinuxfs.c')
-rw-r--r--security/selinux/selinuxfs.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/security/selinux/selinuxfs.c b/security/selinux/selinuxfs.c
index ea39cb742ae5..2d3373b2e256 100644
--- a/security/selinux/selinuxfs.c
+++ b/security/selinux/selinuxfs.c
@@ -280,7 +280,7 @@ static ssize_t sel_write_disable(struct file *file, const char __user *buf,
280 280
281 length = -ENOMEM; 281 length = -ENOMEM;
282 if (count >= PAGE_SIZE) 282 if (count >= PAGE_SIZE)
283 goto out;; 283 goto out;
284 284
285 /* No partial writes. */ 285 /* No partial writes. */
286 length = -EINVAL; 286 length = -EINVAL;
@@ -876,12 +876,12 @@ static ssize_t sel_write_user(struct file *file, char *buf, size_t size)
876 876
877 length = task_has_security(current, SECURITY__COMPUTE_USER); 877 length = task_has_security(current, SECURITY__COMPUTE_USER);
878 if (length) 878 if (length)
879 goto out;; 879 goto out;
880 880
881 length = -ENOMEM; 881 length = -ENOMEM;
882 con = kzalloc(size + 1, GFP_KERNEL); 882 con = kzalloc(size + 1, GFP_KERNEL);
883 if (!con) 883 if (!con)
884 goto out;; 884 goto out;
885 885
886 length = -ENOMEM; 886 length = -ENOMEM;
887 user = kzalloc(size + 1, GFP_KERNEL); 887 user = kzalloc(size + 1, GFP_KERNEL);
@@ -941,7 +941,7 @@ static ssize_t sel_write_member(struct file *file, char *buf, size_t size)
941 length = -ENOMEM; 941 length = -ENOMEM;
942 scon = kzalloc(size + 1, GFP_KERNEL); 942 scon = kzalloc(size + 1, GFP_KERNEL);
943 if (!scon) 943 if (!scon)
944 goto out;; 944 goto out;
945 945
946 length = -ENOMEM; 946 length = -ENOMEM;
947 tcon = kzalloc(size + 1, GFP_KERNEL); 947 tcon = kzalloc(size + 1, GFP_KERNEL);
@@ -1380,10 +1380,14 @@ static int sel_avc_stats_seq_show(struct seq_file *seq, void *v)
1380 if (v == SEQ_START_TOKEN) 1380 if (v == SEQ_START_TOKEN)
1381 seq_printf(seq, "lookups hits misses allocations reclaims " 1381 seq_printf(seq, "lookups hits misses allocations reclaims "
1382 "frees\n"); 1382 "frees\n");
1383 else 1383 else {
1384 seq_printf(seq, "%u %u %u %u %u %u\n", st->lookups, 1384 unsigned int lookups = st->lookups;
1385 st->hits, st->misses, st->allocations, 1385 unsigned int misses = st->misses;
1386 unsigned int hits = lookups - misses;
1387 seq_printf(seq, "%u %u %u %u %u %u\n", lookups,
1388 hits, misses, st->allocations,
1386 st->reclaims, st->frees); 1389 st->reclaims, st->frees);
1390 }
1387 return 0; 1391 return 0;
1388} 1392}
1389 1393