Re: [PATCH] smackfs: check for allocation failures insmk_set_access()

From: James Morris
Date: Wed Dec 24 2008 - 20:17:24 EST


On Mon, 22 Dec 2008, Casey Schaufler wrote:

> Sergio Luis wrote:
> > 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@xxxxxxxxxxxxxx>
> > To: Casey Schaufler <casey@xxxxxxxxxxxxxxxx>
> > Cc: Ahmed S. Darwish <darwish.07@xxxxxxxxx>
> > Cc: LSM <linux-security-module@xxxxxxxxxxxxxxx>
> > Cc: LKLM <linux-kernel@xxxxxxxxxxxxxxx>
> >
>
> Acked-by: Casey Schaufler <casey@xxxxxxxxxxxxxxxx>
>

Applied to:
git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/security-testing-2.6#next

I'll push this to Linus after he pulls the main security update, or with
it on re-send.

--
--
James Morris
<jmorris@xxxxxxxxx>


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/