android_kernel_xiaomi_sm8350/security
Sergio Luis 81ea714bf1 smackfs: check for allocation failures in smk_set_access()
smackfs: check for allocation failures in smk_set_access()

 While adding a new subject/object pair to smack_list, smk_set_access()
 didn't check the return of kzalloc().

 This patch changes smk_set_access() to return 0 or -ENOMEM, based on
 kzalloc()'s return. It also updates its caller, smk_write_load(), to
 check for smk_set_access()'s return, given it is no longer a void
 return function.

 Signed-off-by: Sergio Luis <sergio@larces.uece.br>
 To: Casey Schaufler <casey@schaufler-ca.com>
 Cc: Ahmed S. Darwish <darwish.07@gmail.com>
 Cc: LSM <linux-security-module@vger.kernel.org>
 Cc: LKLM <linux-kernel@vger.kernel.org>

Acked-by: Casey Schaufler <casey@schaufler-ca.com>
2008-12-25 12:14:55 +11:00
..
keys CRED: Make execve() take advantage of copy-on-write credentials 2008-11-14 10:39:24 +11:00
selinux SELinux: don't check permissions for kernel mounts 2008-12-20 09:03:39 +11:00
smack smackfs: check for allocation failures in smk_set_access() 2008-12-25 12:14:55 +11:00
capability.c security: pass mount flags to security_sb_kern_mount() 2008-12-20 09:02:39 +11:00
commoncap.c capabilities: define get_vfs_caps_from_disk when file caps are not enabled 2008-11-15 08:50:52 +11:00
device_cgroup.c devcgroup: remove spin_lock() 2008-10-20 08:52:38 -07:00
inode.c integrity: special fs magic 2008-10-13 09:47:43 +11:00
Kconfig securityfs: do not depend on CONFIG_SECURITY 2008-08-28 10:47:42 +10:00
Makefile securityfs: do not depend on CONFIG_SECURITY 2008-08-28 10:47:42 +10:00
root_plug.c CRED: Make execve() take advantage of copy-on-write credentials 2008-11-14 10:39:24 +11:00
security.c security: pass mount flags to security_sb_kern_mount() 2008-12-20 09:02:39 +11:00