]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/blobdiff - kernel/fail_function.c
Merge tag 'mac80211-next-for-davem-2018-03-29' of git://git.kernel.org/pub/scm/linux...
[mirror_ubuntu-eoan-kernel.git] / kernel / fail_function.c
index 21b0122cb39cb1c8f45976566e3b4f675d50450c..1d5632d8bbccfd941a6b0b1cf0ac380c4aeb0a5c 100644 (file)
 
 static int fei_kprobe_handler(struct kprobe *kp, struct pt_regs *regs);
 
+static void fei_post_handler(struct kprobe *kp, struct pt_regs *regs,
+                            unsigned long flags)
+{
+       /*
+        * A dummy post handler is required to prohibit optimizing, because
+        * jump optimization does not support execution path overriding.
+        */
+}
+
 struct fei_attr {
        struct list_head list;
        struct kprobe kp;
@@ -56,6 +65,7 @@ static struct fei_attr *fei_attr_new(const char *sym, unsigned long addr)
                        return NULL;
                }
                attr->kp.pre_handler = fei_kprobe_handler;
+               attr->kp.post_handler = fei_post_handler;
                attr->retval = adjust_error_retval(addr, 0);
                INIT_LIST_HEAD(&attr->list);
        }