Re: [PATCH 1/2] tpm, tpm_tis: Handle interrupt storm

From: Péter Ujfalusi
Date: Tue May 23 2023 - 03:10:38 EST




On 23/05/2023 09:48, Péter Ujfalusi wrote:
>> static void tpm_tis_gen_interrupt(struct tpm_chip *chip)
>> @@ -804,6 +857,15 @@ static void tpm_tis_gen_interrupt(struct tpm_chip *chip)
>> chip->flags &= ~TPM_CHIP_FLAG_IRQ;
>> }
>>
>> +static void tpm_tis_free_irq_func(struct work_struct *work)
>> +{
>> + struct tpm_tis_data *priv = container_of(work, typeof(*priv), free_irq_work);
>> + struct tpm_chip *chip = priv->chip;
>> +
>> + devm_free_irq(chip->dev.parent, priv->irq, chip);
>> + priv->irq = 0;
>
> Should disable_interrupts() be called instead (with the locality
> request/relinquish)?
>
> Is there a chance of a race or is a race matters?

Nevermind this comment, it is good.

--
Péter