[PATCH] out-of-tree: Whack warning off in kernel/cred.c ...

From: Ingo Molnar
Date: Sat Sep 12 2009 - 04:21:33 EST


Prevent a crash with selinux=0.

NOT-Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
---
kernel/cred.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/kernel/cred.c b/kernel/cred.c
index 006fcab..782e362 100644
--- a/kernel/cred.c
+++ b/kernel/cred.c
@@ -817,10 +817,12 @@ static void dump_invalid_creds(const struct cred *cred, const char *label,
*/
void __invalid_creds(const struct cred *cred, const char *file, unsigned line)
{
+#if 0
printk(KERN_ERR "CRED: Invalid credentials\n");
printk(KERN_ERR "CRED: At %s:%u\n", file, line);
dump_invalid_creds(cred, "Specified", current);
BUG();
+#endif
}
EXPORT_SYMBOL(__invalid_creds);

@@ -844,6 +846,7 @@ void __validate_process_creds(struct task_struct *tsk,
return;

invalid_creds:
+#if 0
printk(KERN_ERR "CRED: Invalid process credentials\n");
printk(KERN_ERR "CRED: At %s:%u\n", file, line);

@@ -853,6 +856,8 @@ invalid_creds:
else
printk(KERN_ERR "CRED: Effective creds == Real creds\n");
BUG();
+#endif
+ ;
}
EXPORT_SYMBOL(__validate_process_creds);

--
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/