lkml.org 
[lkml]   [2010]   [Jun]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 2.6.29.6 - 2.6.35-rc3] CRED: Release spinlock before commit_creds().
From
Date
reparent_to_kthreadd() is calling commit_creds() with tasklist_lock held. But
commit_creds() calls key_fsuid_changed()/key_fsgid_changed()/proc_id_connector()
which may sleep. Release tasklist_lock before calling commit_creds().

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
---
kernel/exit.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- security-testing-2.6.orig/kernel/exit.c
+++ security-testing-2.6/kernel/exit.c
@@ -348,8 +348,8 @@ static void reparent_to_kthreadd(void)
sizeof(current->signal->rlim));

atomic_inc(&init_cred.usage);
- commit_creds(&init_cred);
write_unlock_irq(&tasklist_lock);
+ commit_creds(&init_cred);
}

void __set_special_pids(struct pid *pid)

\
 
 \ /
  Last update: 2010-06-18 05:11    [W:0.066 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site