From: Eric Paris Date: Wed, 4 Apr 2012 19:01:42 +0000 (-0400) Subject: SELinux: delay initialization of audit data in selinux_inode_permission X-Git-Tag: v3.5-rc1~161^2^2~12 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e33405785d3eaec303c54b4a10afdebf3729da7;p=pandora-kernel.git SELinux: delay initialization of audit data in selinux_inode_permission We pay a rather large overhead initializing the common_audit_data. Since we only need this information if we actually emit an audit message there is little need to set it up in the hot path. This patch splits the functionality of avc_has_perm() into avc_has_perm_noaudit(), avc_audit_required() and slow_avc_audit(). But we take care of setting up to audit between required() and the actual audit call. Thus saving measurable time in a hot path. Signed-off-by: Stephen Smalley Signed-off-by: Eric Paris --- Reading git-diff-tree failed