aboutsummaryrefslogtreecommitdiffstats
path: root/security/selinux/ss/policydb.c
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2022-01-25 15:14:20 +0100
committerPaul Moore <paul@paul-moore.com>2022-01-25 19:21:21 -0500
commitbcb62828e3e8c813b6613db6eb7fd9657db248fc (patch)
treefbd29194657e39ad936cd5722eee0da87a13941f /security/selinux/ss/policydb.c
parentselinux: access superblock_security_struct in LSM blob way (diff)
downloadlinux-dev-bcb62828e3e8c813b6613db6eb7fd9657db248fc.tar.xz
linux-dev-bcb62828e3e8c813b6613db6eb7fd9657db248fc.zip
selinux: check return value of sel_make_avc_files
sel_make_avc_files() might fail and return a negative errno value on memory allocation failures. Re-add the check of the return value, dropped in 66f8e2f03c02 ("selinux: sidtab reverse lookup hash table"). Reported by clang-analyzer: security/selinux/selinuxfs.c:2129:2: warning: Value stored to 'ret' is never read [deadcode.DeadStores] ret = sel_make_avc_files(dentry); ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~ Fixes: 66f8e2f03c02 ("selinux: sidtab reverse lookup hash table") Signed-off-by: Christian Göttsche <cgzones@googlemail.com> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> [PM: description line wrapping, added proper commit ref] Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security/selinux/ss/policydb.c')
0 files changed, 0 insertions, 0 deletions