• Home
  • Raw
  • Download

Lines Matching refs:priv

104 static void hold_task_mempolicy(struct proc_maps_private *priv)  in hold_task_mempolicy()  argument
106 struct task_struct *task = priv->task; in hold_task_mempolicy()
109 priv->task_mempolicy = get_task_policy(task); in hold_task_mempolicy()
110 mpol_get(priv->task_mempolicy); in hold_task_mempolicy()
113 static void release_task_mempolicy(struct proc_maps_private *priv) in release_task_mempolicy() argument
115 mpol_put(priv->task_mempolicy); in release_task_mempolicy()
118 static void hold_task_mempolicy(struct proc_maps_private *priv) in hold_task_mempolicy() argument
121 static void release_task_mempolicy(struct proc_maps_private *priv) in release_task_mempolicy() argument
178 struct proc_maps_private *priv = m->private; in m_start() local
187 priv->task = get_proc_task(priv->inode); in m_start()
188 if (!priv->task) in m_start()
191 mm = priv->mm; in m_start()
193 put_task_struct(priv->task); in m_start()
194 priv->task = NULL; in m_start()
200 put_task_struct(priv->task); in m_start()
201 priv->task = NULL; in m_start()
205 hold_task_mempolicy(priv); in m_start()
206 priv->tail_vma = get_gate_vma(mm); in m_start()
212 return priv->tail_vma; in m_start()
217 struct proc_maps_private *priv = m->private; in m_next() local
220 if (vma == priv->tail_vma) in m_next()
225 next = priv->tail_vma; in m_next()
234 struct proc_maps_private *priv = m->private; in m_stop() local
235 struct mm_struct *mm = priv->mm; in m_stop()
237 if (!priv->task) in m_stop()
240 release_task_mempolicy(priv); in m_stop()
243 put_task_struct(priv->task); in m_stop()
244 priv->task = NULL; in m_stop()
250 struct proc_maps_private *priv = __seq_open_private(file, ops, psize); in proc_maps_open() local
252 if (!priv) in proc_maps_open()
255 priv->inode = inode; in proc_maps_open()
256 priv->mm = proc_mem_open(inode, PTRACE_MODE_READ); in proc_maps_open()
257 if (IS_ERR(priv->mm)) { in proc_maps_open()
258 int err = PTR_ERR(priv->mm); in proc_maps_open()
270 struct proc_maps_private *priv = seq->private; in proc_map_release() local
272 if (priv->mm) in proc_map_release()
273 mmdrop(priv->mm); in proc_map_release()
923 struct proc_maps_private *priv = m->private; in show_smaps_rollup() local
930 priv->task = get_proc_task(priv->inode); in show_smaps_rollup()
931 if (!priv->task) in show_smaps_rollup()
934 mm = priv->mm; in show_smaps_rollup()
946 hold_task_mempolicy(priv); in show_smaps_rollup()
948 for (vma = priv->mm->mmap; vma;) { in show_smaps_rollup()
960 release_task_mempolicy(priv); in show_smaps_rollup()
1017 show_vma_header_prefix(m, priv->mm->mmap ? priv->mm->mmap->vm_start : 0, in show_smaps_rollup()
1024 release_task_mempolicy(priv); in show_smaps_rollup()
1030 put_task_struct(priv->task); in show_smaps_rollup()
1031 priv->task = NULL; in show_smaps_rollup()
1052 struct proc_maps_private *priv; in smaps_rollup_open() local
1054 priv = kzalloc(sizeof(*priv), GFP_KERNEL_ACCOUNT); in smaps_rollup_open()
1055 if (!priv) in smaps_rollup_open()
1058 ret = single_open(file, show_smaps_rollup, priv); in smaps_rollup_open()
1062 priv->inode = inode; in smaps_rollup_open()
1063 priv->mm = proc_mem_open(inode, PTRACE_MODE_READ); in smaps_rollup_open()
1064 if (IS_ERR(priv->mm)) { in smaps_rollup_open()
1065 ret = PTR_ERR(priv->mm); in smaps_rollup_open()
1074 kfree(priv); in smaps_rollup_open()
1081 struct proc_maps_private *priv = seq->private; in smaps_rollup_release() local
1083 if (priv->mm) in smaps_rollup_release()
1084 mmdrop(priv->mm); in smaps_rollup_release()
1086 kfree(priv); in smaps_rollup_release()