]> asedeno.scripts.mit.edu Git - linux.git/commit
selinux: remove unnecessary selinux cred request
authorYang Guo <guoyang2@huawei.com>
Thu, 12 Dec 2019 02:02:24 +0000 (10:02 +0800)
committerPaul Moore <paul@paul-moore.com>
Thu, 12 Dec 2019 13:50:39 +0000 (08:50 -0500)
commit210a292874517782bed2e2220c7beb1608d3b05d
treeff1a822ba3402df91a1105ea77e37ac5a08dc717
parentd8db60cb23e49a92cf8cada3297395c7fa50fdf8
selinux: remove unnecessary selinux cred request

task_security_struct was obtained at the beginning of may_create
and selinux_inode_init_security, no need to obtain again.
may_create will be called very frequently when create dir and file.

Cc: Paul Moore <paul@paul-moore.com>
Cc: Stephen Smalley <sds@tycho.nsa.gov>
Cc: Eric Paris <eparis@parisplace.org>
Signed-off-by: Yang Guo <guoyang2@huawei.com>
Signed-off-by: Shaokun Zhang <zhangshaokun@hisilicon.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
security/selinux/hooks.c