summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeff Vander Stoep <jeffv@google.com>2015-02-26 13:54:17 -0800
committerPaul Moore <pmoore@redhat.com>2015-04-06 20:04:54 -0400
commit83d4a806ae46397f606de7376b831524bd3a21e5 (patch)
tree952b111e4f79483efc35ffa4ebeaec412f001ebf
parent4f9a60f5c7e74f3e413a1ede1e8b959d01df4e57 (diff)
downloadop-kernel-dev-83d4a806ae46397f606de7376b831524bd3a21e5.zip
op-kernel-dev-83d4a806ae46397f606de7376b831524bd3a21e5.tar.gz
selinux: remove unnecessary pointer reassignment
Commit f01e1af445fa ("selinux: don't pass in NULL avd to avc_has_perm_noaudit") made this pointer reassignment unnecessary. Avd should continue to reference the stack-based copy. Signed-off-by: Jeff Vander Stoep <jeffv@google.com> Acked-by: Stephen Smalley <sds@tycho.nsa.gov> [PM: tweaked subject line] Signed-off-by: Paul Moore <pmoore@redhat.com>
-rw-r--r--security/selinux/avc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/security/selinux/avc.c b/security/selinux/avc.c
index afcc0ae..3c17dda 100644
--- a/security/selinux/avc.c
+++ b/security/selinux/avc.c
@@ -724,12 +724,10 @@ inline int avc_has_perm_noaudit(u32 ssid, u32 tsid,
rcu_read_lock();
node = avc_lookup(ssid, tsid, tclass);
- if (unlikely(!node)) {
+ if (unlikely(!node))
node = avc_compute_av(ssid, tsid, tclass, avd);
- } else {
+ else
memcpy(avd, &node->ae.avd, sizeof(*avd));
- avd = &node->ae.avd;
- }
denied = requested & ~(avd->allowed);
if (unlikely(denied))
OpenPOWER on IntegriCloud