static int kp_pre_handler(struct kprobe *p, struct pt_regs *regs)
 {
+       if (preemptible()) {
+               handler_errors++;
+               pr_err("pre-handler is preemptible\n");
+       }
        preh_val = (rand1 / div_factor);
        return 0;
 }
 static void kp_post_handler(struct kprobe *p, struct pt_regs *regs,
                unsigned long flags)
 {
+       if (preemptible()) {
+               handler_errors++;
+               pr_err("post-handler is preemptible\n");
+       }
        if (preh_val != (rand1 / div_factor)) {
                handler_errors++;
                pr_err("incorrect value in post_handler\n");
 
 static u32 j_kprobe_target(u32 value)
 {
+       if (preemptible()) {
+               handler_errors++;
+               pr_err("jprobe-handler is preemptible\n");
+       }
        if (value != rand1) {
                handler_errors++;
                pr_err("incorrect value in jprobe handler\n");
 
 static int entry_handler(struct kretprobe_instance *ri, struct pt_regs *regs)
 {
+       if (preemptible()) {
+               handler_errors++;
+               pr_err("kretprobe entry handler is preemptible\n");
+       }
        krph_val = (rand1 / div_factor);
        return 0;
 }
 {
        unsigned long ret = regs_return_value(regs);
 
+       if (preemptible()) {
+               handler_errors++;
+               pr_err("kretprobe return handler is preemptible\n");
+       }
        if (ret != (rand1 / div_factor)) {
                handler_errors++;
                pr_err("incorrect value in kretprobe handler\n");