mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
uprobes: Fold uprobe_reset_state() into uprobe_dup_mmap()
Now that we have uprobe_dup_mmap() we can fold uprobe_reset_state() into the new hook and remove it. mmput()->uprobe_clear_state() can't be called before dup_mmap(). Signed-off-by: Oleg Nesterov <[email protected]> Acked-by: Srikar Dronamraju <[email protected]>
This commit is contained in:
parent
f8ac4ec9c0
commit
61559a8165
3 changed files with 2 additions and 14 deletions
|
|
@ -1148,16 +1148,10 @@ void uprobe_clear_state(struct mm_struct *mm)
|
|||
kfree(area);
|
||||
}
|
||||
|
||||
/*
|
||||
* uprobe_reset_state - Free the area allocated for slots.
|
||||
*/
|
||||
void uprobe_reset_state(struct mm_struct *mm)
|
||||
{
|
||||
mm->uprobes_state.xol_area = NULL;
|
||||
}
|
||||
|
||||
void uprobe_dup_mmap(struct mm_struct *oldmm, struct mm_struct *newmm)
|
||||
{
|
||||
newmm->uprobes_state.xol_area = NULL;
|
||||
|
||||
if (test_bit(MMF_HAS_UPROBES, &oldmm->flags))
|
||||
set_bit(MMF_HAS_UPROBES, &newmm->flags);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue