summaryrefslogtreecommitdiff
path: root/writer
diff options
context:
space:
mode:
authorVyacheslav Cherkashin <v.cherkashin@samsung.com>2014-04-14 18:53:21 +0400
committerVasiliy Ulyanov <v.ulyanov@samsung.com>2014-04-21 06:09:00 -0700
commit3729ea9622af80dec7f2dc616e0991be6f7709ba (patch)
treee7a84408a49e618d0aae4c85a636e96d5f9811e1 /writer
parentc4598a886ca8c6c208e3c35b647b56de2371616b (diff)
downloadswap-modules-3729ea9622af80dec7f2dc616e0991be6f7709ba.tar.gz
swap-modules-3729ea9622af80dec7f2dc616e0991be6f7709ba.tar.bz2
swap-modules-3729ea9622af80dec7f2dc616e0991be6f7709ba.zip
[IMPROVE] ARM: move uprobes installation out of exception
Change-Id: I8e200847a84d2016fb81e007befcdd01952c4797 Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
Diffstat (limited to 'writer')
-rw-r--r--writer/swap_writer_module.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/writer/swap_writer_module.c b/writer/swap_writer_module.c
index fc66c257..7bd1c0b1 100644
--- a/writer/swap_writer_module.c
+++ b/writer/swap_writer_module.c
@@ -260,7 +260,6 @@ static struct vm_area_struct *find_vma_exe_by_dentry(struct mm_struct *mm, struc
{
struct vm_area_struct *vma;
- down_read(&mm->mmap_sem);
for (vma = mm->mmap; vma; vma = vma->vm_next) {
if (vma->vm_file && (vma->vm_flags & VM_EXEC) &&
(vma->vm_file->f_dentry == dentry))
@@ -269,7 +268,6 @@ static struct vm_area_struct *find_vma_exe_by_dentry(struct mm_struct *mm, struc
vma = NULL;
out:
- up_read(&mm->mmap_sem);
return vma;
}
@@ -301,14 +299,12 @@ static char *pack_libs(char *lib_obj, struct mm_struct *mm, u32 *lib_cnt_p)
{
struct vm_area_struct *vma;
- down_read(&mm->mmap_sem);
for (vma = mm->mmap; vma; vma = vma->vm_next) {
if (check_vma(vma)) {
lib_obj = pack_lib_obj(lib_obj, vma);
++(*lib_cnt_p);
}
}
- up_read(&mm->mmap_sem);
return lib_obj;
}
@@ -359,6 +355,7 @@ static char *pack_proc_info(char *payload, struct task_struct *task,
return pack_proc_info_part(end_path, task->mm);
}
+/* called with down\up\_read(&task->mm->mmap_sem) */
int proc_info_msg(struct task_struct *task, struct dentry *dentry)
{
char *buf, *payload, *buf_end;