diff options
author | Jeff Vander Stoep <jeffv@google.com> | 2015-02-26 13:54:17 -0800 |
---|---|---|
committer | Bernhard Rosenkränzer <bero@lindev.ch> | 2016-09-29 04:25:36 +0200 |
commit | b19b04279bcd17132679a7ad2a3e310082fc01fc (patch) | |
tree | 8c322997324e8531727dedc2a73c7dd7cdf3a723 | |
parent | e39b9cad29931f4428f8255dd8bda5c1f5752605 (diff) |
selinux: remove unnecessary pointer reassignment
(cherry pick from commit 83d4a806ae46397f606de7376b831524bd3a21e5)
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>
Bug: 22846070
Change-Id: I8fcba45a5acc4de862bd5b3f07bf4980f67133c4
-rw-r--r-- | security/selinux/avc.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/security/selinux/avc.c b/security/selinux/avc.c index 7b733b2d333c..a28beeeac4a4 100644 --- a/security/selinux/avc.c +++ b/security/selinux/avc.c @@ -744,12 +744,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)) |