drm/edid/firmware: Add built-in edid/1280x720.bin firmware
[platform/kernel/linux-starfive.git] / kernel / trace / rethook.c
index c69d822..60f6cb2 100644 (file)
@@ -83,8 +83,10 @@ struct rethook *rethook_alloc(void *data, rethook_handler_t handler)
 {
        struct rethook *rh = kzalloc(sizeof(struct rethook), GFP_KERNEL);
 
-       if (!rh || !handler)
+       if (!rh || !handler) {
+               kfree(rh);
                return NULL;
+       }
 
        rh->data = data;
        rh->handler = handler;
@@ -286,7 +288,7 @@ unsigned long rethook_trampoline_handler(struct pt_regs *regs,
         * These loops must be protected from rethook_free_rcu() because those
         * are accessing 'rhn->rethook'.
         */
-       preempt_disable();
+       preempt_disable_notrace();
 
        /*
         * Run the handler on the shadow stack. Do not unlink the list here because
@@ -319,7 +321,7 @@ unsigned long rethook_trampoline_handler(struct pt_regs *regs,
                first = first->next;
                rethook_recycle(rhn);
        }
-       preempt_enable();
+       preempt_enable_notrace();
 
        return correct_ret_addr;
 }