diff options
-rw-r--r-- | include/linux/uprobes.h | 4 | ||||
-rw-r--r-- | kernel/events/uprobes.c | 10 | ||||
-rw-r--r-- | kernel/fork.c | 2 |
3 files changed, 2 insertions, 14 deletions
diff --git a/include/linux/uprobes.h b/include/linux/uprobes.h index 4a37ab153247..30297f95c8af 100644 --- a/include/linux/uprobes.h +++ b/include/linux/uprobes.h | |||
@@ -118,7 +118,6 @@ extern void uprobe_notify_resume(struct pt_regs *regs); | |||
118 | extern bool uprobe_deny_signal(void); | 118 | extern bool uprobe_deny_signal(void); |
119 | extern bool __weak arch_uprobe_skip_sstep(struct arch_uprobe *aup, struct pt_regs *regs); | 119 | extern bool __weak arch_uprobe_skip_sstep(struct arch_uprobe *aup, struct pt_regs *regs); |
120 | extern void uprobe_clear_state(struct mm_struct *mm); | 120 | extern void uprobe_clear_state(struct mm_struct *mm); |
121 | extern void uprobe_reset_state(struct mm_struct *mm); | ||
122 | #else /* !CONFIG_UPROBES */ | 121 | #else /* !CONFIG_UPROBES */ |
123 | struct uprobes_state { | 122 | struct uprobes_state { |
124 | }; | 123 | }; |
@@ -163,8 +162,5 @@ static inline void uprobe_copy_process(struct task_struct *t) | |||
163 | static inline void uprobe_clear_state(struct mm_struct *mm) | 162 | static inline void uprobe_clear_state(struct mm_struct *mm) |
164 | { | 163 | { |
165 | } | 164 | } |
166 | static inline void uprobe_reset_state(struct mm_struct *mm) | ||
167 | { | ||
168 | } | ||
169 | #endif /* !CONFIG_UPROBES */ | 165 | #endif /* !CONFIG_UPROBES */ |
170 | #endif /* _LINUX_UPROBES_H */ | 166 | #endif /* _LINUX_UPROBES_H */ |
diff --git a/kernel/events/uprobes.c b/kernel/events/uprobes.c index 33870b17e1dd..610e1c8050cf 100644 --- a/kernel/events/uprobes.c +++ b/kernel/events/uprobes.c | |||
@@ -1148,16 +1148,10 @@ void uprobe_clear_state(struct mm_struct *mm) | |||
1148 | kfree(area); | 1148 | kfree(area); |
1149 | } | 1149 | } |
1150 | 1150 | ||
1151 | /* | ||
1152 | * uprobe_reset_state - Free the area allocated for slots. | ||
1153 | */ | ||
1154 | void uprobe_reset_state(struct mm_struct *mm) | ||
1155 | { | ||
1156 | mm->uprobes_state.xol_area = NULL; | ||
1157 | } | ||
1158 | |||
1159 | void uprobe_dup_mmap(struct mm_struct *oldmm, struct mm_struct *newmm) | 1151 | void uprobe_dup_mmap(struct mm_struct *oldmm, struct mm_struct *newmm) |
1160 | { | 1152 | { |
1153 | newmm->uprobes_state.xol_area = NULL; | ||
1154 | |||
1161 | if (test_bit(MMF_HAS_UPROBES, &oldmm->flags)) | 1155 | if (test_bit(MMF_HAS_UPROBES, &oldmm->flags)) |
1162 | set_bit(MMF_HAS_UPROBES, &newmm->flags); | 1156 | set_bit(MMF_HAS_UPROBES, &newmm->flags); |
1163 | } | 1157 | } |
diff --git a/kernel/fork.c b/kernel/fork.c index cbb5f9fcd3e8..2343c9eaaaf4 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -837,8 +837,6 @@ struct mm_struct *dup_mm(struct task_struct *tsk) | |||
837 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE | 837 | #ifdef CONFIG_TRANSPARENT_HUGEPAGE |
838 | mm->pmd_huge_pte = NULL; | 838 | mm->pmd_huge_pte = NULL; |
839 | #endif | 839 | #endif |
840 | uprobe_reset_state(mm); | ||
841 | |||
842 | if (!mm_init(mm, tsk)) | 840 | if (!mm_init(mm, tsk)) |
843 | goto fail_nomem; | 841 | goto fail_nomem; |
844 | 842 | ||