lkml.org 
[lkml]   [2009]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] out-of-tree: Whack warning off in kernel/cred.c ...

* Ingo Molnar <mingo@elte.hu> wrote:

> > I'll try a blind (and manual) revert of:
> >
> > ee18d64: KEYS: Add a keyctl to install a process's session keyring
> > on its parent [try #6
>
> that didnt do the trick, nor did this:
>
> 1a51e09: Revert "KEYS: Add a keyctl to install a process's session keyring on its parent
>
> These were the only two changes to cred.c.

Whacking off the BUG()s via the hack below gave me a booting system.

( Btw., WARN_ONCE() / WARN_ON_ONCE() constructs are in fashion these
days not BUG() - they are real time savers ;-) )

Ingo

---------->
From 2723334da705b2bb162bb6c7dabbbb4806278758 Mon Sep 17 00:00:00 2001
From: Ingo Molnar <mingo@elte.hu>
Date: Sat, 12 Sep 2009 10:21:33 +0200
Subject: [PATCH] out-of-tree: Whack warning off in kernel/cred.c ...
Prevent a crash with selinux=0.

NOT-Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
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);


\
 
 \ /
  Last update: 2009-09-12 10:43    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site