Lines Matching refs:user_mm

707 	struct user_event_mm *user_mm;  in user_event_mm_alloc()  local
709 user_mm = kzalloc(sizeof(*user_mm), GFP_KERNEL_ACCOUNT); in user_event_mm_alloc()
711 if (!user_mm) in user_event_mm_alloc()
714 user_mm->mm = t->mm; in user_event_mm_alloc()
715 INIT_LIST_HEAD(&user_mm->enablers); in user_event_mm_alloc()
716 refcount_set(&user_mm->refcnt, 1); in user_event_mm_alloc()
717 refcount_set(&user_mm->tasks, 1); in user_event_mm_alloc()
727 mmgrab(user_mm->mm); in user_event_mm_alloc()
729 return user_mm; in user_event_mm_alloc()
732 static void user_event_mm_attach(struct user_event_mm *user_mm, struct task_struct *t) in user_event_mm_attach() argument
737 list_add_rcu(&user_mm->mms_link, &user_event_mms); in user_event_mm_attach()
740 t->user_event_mm = user_mm; in user_event_mm_attach()
745 struct user_event_mm *user_mm = current->user_event_mm; in current_user_event_mm() local
747 if (user_mm) in current_user_event_mm()
750 user_mm = user_event_mm_alloc(current); in current_user_event_mm()
752 if (!user_mm) in current_user_event_mm()
755 user_event_mm_attach(user_mm, current); in current_user_event_mm()
757 refcount_inc(&user_mm->refcnt); in current_user_event_mm()
759 return user_mm; in current_user_event_mm()
868 struct user_event_mm *user_mm = current_user_event_mm(); in current_user_event_enabler_exists() local
871 if (!user_mm) in current_user_event_enabler_exists()
874 exists = user_event_enabler_exists(user_mm, uaddr, bit); in current_user_event_enabler_exists()
876 user_event_mm_put(user_mm); in current_user_event_enabler_exists()
886 struct user_event_mm *user_mm; in user_event_enabler_create() local
890 user_mm = current_user_event_mm(); in user_event_enabler_create()
892 if (!user_mm) in user_event_enabler_create()
914 mmap_read_lock(user_mm->mm); in user_event_enabler_create()
915 *write_result = user_event_enabler_write(user_mm, enabler, false, in user_event_enabler_create()
917 mmap_read_unlock(user_mm->mm); in user_event_enabler_create()
929 list_add_rcu(&enabler->mm_enablers_link, &user_mm->enablers); in user_event_enabler_create()
936 if (!user_event_mm_fault_in(user_mm, uaddr, attempt)) in user_event_enabler_create()
943 user_event_mm_put(user_mm); in user_event_enabler_create()
2586 static int user_event_mm_clear_bit(struct user_event_mm *user_mm, in user_event_mm_clear_bit() argument
2602 mmap_read_lock(user_mm->mm); in user_event_mm_clear_bit()
2603 result = user_event_enabler_write(user_mm, &enabler, false, &attempt); in user_event_mm_clear_bit()
2604 mmap_read_unlock(user_mm->mm); in user_event_mm_clear_bit()
2610 if (!user_event_mm_fault_in(user_mm, uaddr, attempt)) in user_event_mm_clear_bit()