提交 83d4a806 编写于 作者: J Jeff Vander Stoep 提交者: Paul Moore

selinux: remove unnecessary pointer reassignment

Commit f01e1af4 ("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: NJeff Vander Stoep <jeffv@google.com>
Acked-by: NStephen Smalley <sds@tycho.nsa.gov>
[PM: tweaked subject line]
Signed-off-by: NPaul Moore <pmoore@redhat.com>
上级 4f9a60f5
......@@ -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))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册