hugetlb: introduce generic version of hugetlb_free_pgd_range
[linux/fpc-iii.git] / arch / x86 / lib / error-inject.c
blob3cdf06128d13c11b60ca2aa7cadf32af03703020
1 // SPDX-License-Identifier: GPL-2.0
3 #include <linux/error-injection.h>
4 #include <linux/kprobes.h>
6 asmlinkage void just_return_func(void);
8 asm(
9 ".type just_return_func, @function\n"
10 ".globl just_return_func\n"
11 "just_return_func:\n"
12 " ret\n"
13 ".size just_return_func, .-just_return_func\n"
16 void override_function_with_return(struct pt_regs *regs)
18 regs->ip = (unsigned long)&just_return_func;
20 NOKPROBE_SYMBOL(override_function_with_return);