mirror of
https://github.com/torvalds/linux.git
synced 2026-12-02 19:42:26 +00:00
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 <[email protected]> To: Casey Schaufler <[email protected]> Cc: Ahmed S. Darwish <[email protected]> Cc: LSM <[email protected]> Cc: LKLM <[email protected]> Acked-by: Casey Schaufler <[email protected]>