Re: [PATCHv2] exec: Fix a deadlock in ptrace

From
Oleg Nesterov <oleg@redhat.com>
Date
2020-03-02 12:28:49
Also in
linux-fsdevel, linux-mm, lkml, stable
Reply to
Bernd Edlinger, 2020-03-01
On 03/01, Bernd Edlinger wrote:
This fixes a deadlock in the tracer when tracing a multi-threaded
application that calls execve while more than one thread are running.
Heh. Yes, known problem. See my attempt to fix it:
https://lore.kernel.org/lkml/20170213141452.GA30203@redhat.com/ (local)
quoted hunk ↗ jump to hunk
@@ -1224,7 +1224,7 @@ struct mm_struct *mm_access(struct task_struct *task, unsigned int mode)
 	struct mm_struct *mm;
 	int err;
 
-	err =  mutex_lock_killable(&task->signal->cred_guard_mutex);
+	err =  mutex_lock_killable(&task->signal->cred_change_mutex);
So if I understand correctly your patch doesn't fix other problems
with debugger waiting for cred_guard_mutex.

I too do not think this can justify the new mutex in signal_struct...

Oleg.
Thread (15 messages) 15 messages, 5 authors, last reply 2020-03-02
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help