lkml.org 
[lkml]   [2011]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH][RFC] Null short-circuit for selinux_cred_free()
On Wed, 23 Mar 2011, Tetsuo Handa wrote:

> Jesper Juhl wrote:
> > Let selinux_cred_free accept NULL pointers.
> No need to do so.
>
> > If we don't do this, then we can crash if someone manages to pass NULL to
> > cred_free. Seems to me it's better to just do nothing in that case rather
> > than crash.
> If cred == NULL, put_cred_rcu(NULL) causes the kernel to panic before calling
> LSM hooks.

Good point. Thanks.

--
Jesper Juhl <jj@chaosbits.net> http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.



\
 
 \ /
  Last update: 2011-03-23 22:09    [W:0.065 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site