diff options
author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2010-02-19 13:42:35 -0500 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-29 17:27:04 -0400 |
commit | 8ad3e04b815e44d084b855cfa3dcda260cdf56ae (patch) | |
tree | 27ec48828036314a810bace8afa90eab2ac1d3b9 /litmus/litmus.c | |
parent | 944f051fda9551483399bed556870b0895df1efa (diff) |
Bugfix: don't inherit od_table across forks
The od_table is strictly per-thread and should not be inherited across
a fork/clone. This caused memory corruption when a task exited, which
ultimately could lead to oopses in unrelated code.
Bug and testcase initially reported by Glenn.
Diffstat (limited to 'litmus/litmus.c')
-rw-r--r-- | litmus/litmus.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/litmus/litmus.c b/litmus/litmus.c index 589062f8ab87..3cf7cb9e8a9f 100644 --- a/litmus/litmus.c +++ b/litmus/litmus.c | |||
@@ -418,6 +418,9 @@ void litmus_fork(struct task_struct* p) | |||
418 | else | 418 | else |
419 | /* non-rt tasks might have ctrl_page set */ | 419 | /* non-rt tasks might have ctrl_page set */ |
420 | tsk_rt(p)->ctrl_page = NULL; | 420 | tsk_rt(p)->ctrl_page = NULL; |
421 | |||
422 | /* od tables are never inherited across a fork */ | ||
423 | p->od_table = NULL; | ||
421 | } | 424 | } |
422 | 425 | ||
423 | /* Called upon execve(). | 426 | /* Called upon execve(). |