lkml.org 
[lkml]   [2003]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: heavy handed exit() in latest BK
--- /home/roland/redhat/linux-2.5.59-1.1007/fs/exec.c.~1~	Fri Feb  7 20:04:27 2003
+++ /home/roland/redhat/linux-2.5.59-1.1007/fs/exec.c Sun Feb 9 17:25:31 2003
@@ -601,9 +601,12 @@ static inline int de_thread(struct task_

if (thread_group_empty(current))
goto no_thread_group;
+
/*
- * Kill all other threads in the thread group:
+ * Kill all other threads in the thread group.
+ * We must hold tasklist_lock to call zap_other_threads.
*/
+ read_lock(&tasklist_lock);
spin_lock_irq(lock);
if (oldsig->group_exit) {
/*
@@ -611,6 +614,7 @@ static inline int de_thread(struct task_
* return so that the signal is processed.
*/
spin_unlock_irq(lock);
+ read_unlock(&tasklist_lock);
kmem_cache_free(sighand_cachep, newsighand);
if (newsig)
kmem_cache_free(signal_cachep, newsig);
@@ -618,6 +622,7 @@ static inline int de_thread(struct task_
}
oldsig->group_exit = 1;
zap_other_threads(current);
+ read_unlock(&tasklist_lock);

/*
* Account for the thread group leader hanging around:
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 13:33    [W:0.057 / U:0.732 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site