Re: [PATCH][RFC] Null short-circuit for selinux_cred_free()

From: Tetsuo Handa
Date: Tue Mar 22 2011 - 23:52:03 EST

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.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at