RE: [PATCH] x86/mce/therm_throt: Fix the access of uninitialized therm_work

From: Liu, Chuansheng
Date: Mon Jan 06 2020 - 05:10:16 EST




> -----Original Message-----
> From: Boris Petkov <bp@xxxxxxxxx>
> Sent: Monday, January 6, 2020 6:01 PM
> To: Liu, Chuansheng <chuansheng.liu@xxxxxxxxx>
> Cc: linux-kernel@xxxxxxxxxxxxxxx; Luck, Tony <tony.luck@xxxxxxxxx>;
> tglx@xxxxxxxxxxxxx; mingo@xxxxxxxxxx; hpa@xxxxxxxxx
> Subject: RE: [PATCH] x86/mce/therm_throt: Fix the access of uninitialized
> therm_work
>
> On January 6, 2020 10:22:06 AM GMT+01:00, "Liu, Chuansheng"
> <chuansheng.liu@xxxxxxxxx> wrote:
> >I traced there is about 2s gap between unmask interrupt and workqueue
> >Initialization.
>
> And that is a problem because?
>
> You setup workqueue etc and *then* unmask the irq.
>
Some previous experience shows:
If there is critical thermal alert, we still can take action in kernel side in this
2s, even though the workqueue is not ready, but interrupt handler can work
well.