From: Sergio Luis Date: Mon, 22 Dec 2008 04:16:15 +0000 (-0300) Subject: smackfs: check for allocation failures in smk_set_access() X-Git-Tag: v2.6.29-rc1~577^2^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=81ea714bf148fce35e931edcbdfd3aedda20d1dc;p=pandora-kernel.git 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 To: Casey Schaufler Cc: Ahmed S. Darwish Cc: LSM Cc: LKLM Acked-by: Casey Schaufler --- Reading git-diff-tree failed