summaryrefslogtreecommitdiff
path: root/arch/csky/lib/error-inject.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/csky/lib/error-inject.c')
-rw-r--r--arch/csky/lib/error-inject.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/csky/lib/error-inject.c b/arch/csky/lib/error-inject.c
new file mode 100644
index 000000000000..c15fb36fe067
--- /dev/null
+++ b/arch/csky/lib/error-inject.c
@@ -0,0 +1,10 @@
+// SPDX-License-Identifier: GPL-2.0
+
+#include <linux/error-injection.h>
+#include <linux/kprobes.h>
+
+void override_function_with_return(struct pt_regs *regs)
+{
+ instruction_pointer_set(regs, regs->lr);
+}
+NOKPROBE_SYMBOL(override_function_with_return);