An attempt to fix kprobe for Tegra ("Null pointer dereference" bug) by flush_cache_all()
authorDmitry Kovalenko <d.kovalenko@samsung.com>
Mon, 23 May 2011 09:07:34 +0000 (13:07 +0400)
committerDmitry Kovalenko <d.kovalenko@samsung.com>
Mon, 23 May 2011 09:07:34 +0000 (13:07 +0400)
kprobe/arch/asm-arm/dbi_kprobes.c

index 70572dc..dc7a9fe 100644 (file)
@@ -28,6 +28,8 @@
 
 #include<linux/module.h>
 
+#include <linux/mm.h>
+
 #include "dbi_kprobes.h"
 #include "../dbi_kprobes.h"
 
@@ -595,6 +597,7 @@ int arch_prepare_kprobe (struct kprobe *p)
                                else
                                {
                                        memcpy (insns, gen_insn_execbuf, sizeof (insns));
+                                       flush_cache_all();
                                        insns[KPROBES_TRAMP_INSN_IDX] = insn[0];
                                }
                                //insns[KPROBES_TRAMP_RET_BREAK_IDX] = UNDEF_INSTRUCTION;