lkml.org 
[lkml]   [2011]   [Nov]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Linus GIT - INFO: possible circular locking dependency detected
(cc'ed Andrew and Alexey)

On Thu, Nov 03, 2011 at 20:49 +0000, Luis Henriques wrote:
> On Thu, Nov 03, 2011 at 11:57:20AM -0400, Miles Lane wrote:
> ...
>
> I'm hitting the exact same problem, using a minimal .config file (can send
> it if required), by just running "find /".
>
> I have bisected the problem and found that commit
> aa6afca5bcaba8101f3ea09d5c3e4100b2b9f0e5 seems to be the cause of it.

procfs holds sig->cred_guard_mutex to ensure the target's credentials are
not changed. It is held for a little timeslice. From the stack trace I
don't understand how sys_execve() can happen with ->cred_guard_mutex
held:

static struct dentry *proc_lookupfd_common(struct inode *dir,
struct dentry *dentry,
instantiate_t instantiate)
{
...
if (lock_trace(task))
goto out;

result = instantiate(dir, dentry, task, &fd);
unlock_trace(task);
...
}


static int lock_trace(struct task_struct *task)
{
int err = mutex_lock_killable(&task->signal->cred_guard_mutex);
if (err)
return err;
if (!ptrace_may_access(task, PTRACE_MODE_ATTACH)) {
mutex_unlock(&task->signal->cred_guard_mutex);
return -EPERM;
}
return 0;
}

proc_lookupfd_common() always exits without ->cred_guard_mutex held.


Thanks,

--
Vasiliy Kulikov
http://www.openwall.com - bringing security into open computing environments


\
 
 \ /
  Last update: 2011-11-05 10:35    [W:0.387 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site