Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
54fa2f39
Commit
54fa2f39
authored
Feb 09, 2003
by
Roland McGrath
Committed by
Linus Torvalds
Feb 09, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] zap_other_threads() needs tasklist_lock held
parent
ad370e28
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
fs/exec.c
fs/exec.c
+6
-1
No files found.
fs/exec.c
View file @
54fa2f39
...
@@ -601,9 +601,12 @@ static inline int de_thread(struct task_struct *tsk)
...
@@ -601,9 +601,12 @@ static inline int de_thread(struct task_struct *tsk)
if
(
thread_group_empty
(
current
))
if
(
thread_group_empty
(
current
))
goto
no_thread_group
;
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
);
spin_lock_irq
(
lock
);
if
(
oldsig
->
group_exit
)
{
if
(
oldsig
->
group_exit
)
{
/*
/*
...
@@ -611,6 +614,7 @@ static inline int de_thread(struct task_struct *tsk)
...
@@ -611,6 +614,7 @@ static inline int de_thread(struct task_struct *tsk)
* return so that the signal is processed.
* return so that the signal is processed.
*/
*/
spin_unlock_irq
(
lock
);
spin_unlock_irq
(
lock
);
read_unlock
(
&
tasklist_lock
);
kmem_cache_free
(
sighand_cachep
,
newsighand
);
kmem_cache_free
(
sighand_cachep
,
newsighand
);
if
(
newsig
)
if
(
newsig
)
kmem_cache_free
(
signal_cachep
,
newsig
);
kmem_cache_free
(
signal_cachep
,
newsig
);
...
@@ -618,6 +622,7 @@ static inline int de_thread(struct task_struct *tsk)
...
@@ -618,6 +622,7 @@ static inline int de_thread(struct task_struct *tsk)
}
}
oldsig
->
group_exit
=
1
;
oldsig
->
group_exit
=
1
;
zap_other_threads
(
current
);
zap_other_threads
(
current
);
read_unlock
(
&
tasklist_lock
);
/*
/*
* Account for the thread group leader hanging around:
* Account for the thread group leader hanging around:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment