On Sun, 18 Feb 2024 22:41:24 +0100
Boris Brezillon <boris.brezil...@collabora.com> wrote:

> +static void panthor_sched_immediate_tick(struct panthor_device *ptdev)
> +{
> +     struct panthor_scheduler *sched = ptdev->scheduler;
> +
> +     sched_queue_delayed_work(sched, tick, 0);
> +}
> +
> +/**
> + * panthor_sched_report_mmu_fault() - Report MMU faults to the scheduler.
> + */
> +void panthor_sched_report_mmu_fault(struct panthor_device *ptdev)
> +{
> +     /* Force a tick to immediately kill faulty groups. */
> +     panthor_sched_immediate_tick(ptdev);

We need

        if (ptdev->scheduler)
                panthor_sched_immediate_tick(ptdev);

to prevent a NULL deref in panthor_sched_immediate_tick() if the MMU
fault handler is called before the scheduler block is initialized (FW
boot might trigger MMU faults on AS0).

> +}

Reply via email to