diff options
-rw-r--r-- | fs/exec.c | 2 | ||||
-rw-r--r-- | include/linux/mm_types.h | 13 |
2 files changed, 12 insertions, 3 deletions
@@ -736,7 +736,7 @@ static int exec_mmap(struct mm_struct *mm) | |||
736 | tsk->active_mm = mm; | 736 | tsk->active_mm = mm; |
737 | activate_mm(active_mm, mm); | 737 | activate_mm(active_mm, mm); |
738 | task_unlock(tsk); | 738 | task_unlock(tsk); |
739 | mm_update_next_owner(mm); | 739 | mm_update_next_owner(old_mm); |
740 | arch_pick_mmap_layout(mm); | 740 | arch_pick_mmap_layout(mm); |
741 | if (old_mm) { | 741 | if (old_mm) { |
742 | up_read(&old_mm->mmap_sem); | 742 | up_read(&old_mm->mmap_sem); |
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index eb7c16cc9559..02a27ae78539 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h | |||
@@ -226,8 +226,17 @@ struct mm_struct { | |||
226 | rwlock_t ioctx_list_lock; /* aio lock */ | 226 | rwlock_t ioctx_list_lock; /* aio lock */ |
227 | struct kioctx *ioctx_list; | 227 | struct kioctx *ioctx_list; |
228 | #ifdef CONFIG_MM_OWNER | 228 | #ifdef CONFIG_MM_OWNER |
229 | struct task_struct *owner; /* The thread group leader that */ | 229 | /* |
230 | /* owns the mm_struct. */ | 230 | * "owner" points to a task that is regarded as the canonical |
231 | * user/owner of this mm. All of the following must be true in | ||
232 | * order for it to be changed: | ||
233 | * | ||
234 | * current == mm->owner | ||
235 | * current->mm != mm | ||
236 | * new_owner->mm == mm | ||
237 | * new_owner->alloc_lock is held | ||
238 | */ | ||
239 | struct task_struct *owner; | ||
231 | #endif | 240 | #endif |
232 | 241 | ||
233 | #ifdef CONFIG_PROC_FS | 242 | #ifdef CONFIG_PROC_FS |