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

From: Markus Elfring

Date: Sat Sep 27 2025 - 10:55:07 EST



> +++ 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

Regards,
Markus