[FIX] excess filtering handle_mm_fault()
authorVyacheslav Cherkashin <v.cherkashin@samsung.com>
Mon, 14 Oct 2013 07:13:48 +0000 (11:13 +0400)
committerVyacheslav Cherkashin <v.cherkashin@samsung.com>
Mon, 14 Oct 2013 08:55:07 +0000 (12:55 +0400)
remove flag VM_ACCOUNT from check_vma()

Change-Id: I44f6654a055d2ea9594bf00035b123d86b0051de
Signed-off-by: Vyacheslav Cherkashin <v.cherkashin@samsung.com>
us_manager/sspt/sspt.h
writer/swap_writer_module.c

index afab4ca..ac71e46 100644 (file)
 
 static int check_vma(struct vm_area_struct *vma)
 {
-       return vma->vm_file && !(vma->vm_pgoff != 0 || !(vma->vm_flags & VM_EXEC) || (vma->vm_flags & VM_ACCOUNT) ||
-                       !(vma->vm_flags & (VM_WRITE | VM_MAYWRITE)) ||
-                       !(vma->vm_flags & (VM_READ | VM_MAYREAD)));
+       return vma->vm_file &&
+              !(vma->vm_pgoff != 0 ||
+                !(vma->vm_flags & VM_EXEC) ||
+                !(vma->vm_flags & (VM_READ | VM_MAYREAD)));
 }
 
 static inline int sspt_register_usprobe(struct us_ip *ip)
index 148d130..fdd3d2c 100644 (file)
@@ -240,8 +240,10 @@ static char *pack_lib_obj(char *lib_obj, struct vm_area_struct *vma)
 /* FIXME: check_vma()*/
 static int check_vma(struct vm_area_struct *vma)
 {
-       return vma->vm_file && !(vma->vm_pgoff != 0 || !(vma->vm_flags & VM_EXEC) || (vma->vm_flags & VM_ACCOUNT) ||
-                       !(vma->vm_flags & (VM_READ | VM_MAYREAD)));
+       return vma->vm_file &&
+              !(vma->vm_pgoff != 0 ||
+                !(vma->vm_flags & VM_EXEC) ||
+                !(vma->vm_flags & (VM_READ | VM_MAYREAD)));
 }
 
 static struct vm_area_struct *find_vma_exe_by_dentry(struct mm_struct *mm, struct dentry *dentry)