picofix
authorDmitry Kovalenko <d.kovalenko@samsung.com>
Mon, 16 May 2011 06:45:33 +0000 (10:45 +0400)
committerDmitry Kovalenko <d.kovalenko@samsung.com>
Mon, 16 May 2011 06:45:33 +0000 (10:45 +0400)
kprobe/dbi_kprobes_deps.c

index 9c5e6eb..704720f 100644 (file)
@@ -53,7 +53,9 @@ struct mm_struct init_mm;
 
 DECLARE_MOD_CB_DEP(kallsyms_search, unsigned long, const char *name);
 DECLARE_MOD_FUNC_DEP(access_process_vm, int, struct task_struct * tsk, unsigned long addr, void *buf, int len, int write);
+#if LINUX_VERSION_CODE == KERNEL_VERSION(2, 6, 32)
 DECLARE_MOD_FUNC_DEP(copy_to_user_page, void, struct vm_area_struct *vma, struct page *page, unsigned long uaddr, void *dst, const void *src, unsigned long len);
+#endif
 
 DECLARE_MOD_FUNC_DEP(find_extend_vma, struct vm_area_struct *, struct mm_struct * mm, unsigned long addr);
 
@@ -155,8 +157,10 @@ IMP_MOD_DEP_WRAPPER (vm_normal_page, vma, addr, pte)
                        unsigned long uaddr, void *kaddr, unsigned long len, int write)
 IMP_MOD_DEP_WRAPPER (flush_ptrace_access, vma, page, uaddr, kaddr, len, write)
 
+#if LINUX_VERSION_CODE == KERNEL_VERSION(2, 6, 32)
        DECLARE_MOD_DEP_WRAPPER(copy_to_user_page, void, struct vm_area_struct *vma, struct page *page, unsigned long uaddr, void *dst, const void *src, unsigned long len)
 IMP_MOD_DEP_WRAPPER (copy_to_user_page, vma, page, uaddr, dst, src, len)
+#endif
 
 
 int init_module_dependencies()
@@ -200,7 +204,10 @@ int init_module_dependencies()
        INIT_MOD_DEP_VAR(put_task_struct, __put_task_struct_cb);
 #endif
 
+
+#if (LINUX_VERSION_CODE == KERNEL_VERSION(2, 6, 32))
        INIT_MOD_DEP_VAR(copy_to_user_page, copy_to_user_page);
+#endif
 
        return 0;
 }