Re: [PATCH] intel_th: core: fix null pointer dereference in intel_th_irq

From: David Arcari

Date: Mon Sep 29 2025 - 08:05:22 EST



Hi Markus,

On 9/27/25 10:54 AM, Markus Elfring wrote:

+++ b/drivers/hwtracing/intel_th/core.c
@@ -715,7 +715,9 @@ intel_th_subdevice_alloc(struct intel_th *th,
int intel_th_output_enable(struct intel_th *th, unsigned int otype)
{
struct intel_th_device *thdev;
- int src = 0, dst = 0;
+ int src = 0, dst = 0, ret = 0;
+
+ disable_irq(th->irq);

- return 0;
+ enable_irq(th->irq);
+ return ret;
}


How do you think about to increase the application of scope-based resource management?
https://elixir.bootlin.com/linux/v6.17-rc7/source/include/linux/interrupt.h#L239-L240

At this point, I think that Alex is the best person to handle the resolution of this issue.

Best,
-DA


Regards,
Markus