From: Lino Sanfilippo <l.sanfilippo@kunbus.com>
To: "Elliott, Robert (Servers)" <elliott@hpe.com>,
"jarkko@kernel.org" <jarkko@kernel.org>,
"peterhuewe@gmx.de" <peterhuewe@gmx.de>
Cc: "LinoSanfilippo@gmx.de" <LinoSanfilippo@gmx.de>,
"p.rosenberger@kunbus.com" <p.rosenberger@kunbus.com>,
"lukas@wunner.de" <lukas@wunner.de>,
"jgg@ziepe.ca" <jgg@ziepe.ca>,
"linux-integrity@vger.kernel.org"
<linux-integrity@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [PATCH] tpm,tpm_tis: Avoid warning splat at shutdown
Date: Fri, 2 Feb 2024 02:13:32 +0100 [thread overview]
Message-ID: <cc182e56-d0de-4a47-bc0a-d0c830649166@kunbus.com> (raw)
In-Reply-To: <MW5PR84MB184274E28D83DC337B486CEFAB432@MW5PR84MB1842.NAMPRD84.PROD.OUTLOOK.COM>
On 01.02.24 17:40, Elliott, Robert (Servers) wrote:
> ATTENTION: This e-mail is from an external sender. Please check attachments and links before opening e.g. with mouseover.
>
>
>> From: Lino Sanfilippo <l.sanfilippo@kunbus.com>
>> Sent: Thursday, February 1, 2024 5:37 AM
>> Subject: [PATCH] tpm,tpm_tis: Avoid warning splat at shutdown
>>
>> If interrupts are not activated the work struct 'free_irq_work' is not
>> initialized. This results in a warning splat at module shutdown.
>>
>> Fix this by always initializing the work regardless of whether interrupts
>> are activated or not.
>
> That's using flush_work(), which just waits for one to complete. Is there
> any case where multiple work entries could be queued, and cancel_work_sync()
> would be necessary?
>
No. There is only one work struct (namely free_irq_work) and it can only be
queued once at a time (note that schedule_work() does not queue the same work
again if it is already queued).
> tpm_tis_probe_irq() has a loop calling tpm_tis_probe_irq_single()
> for 3 to 15. Could each of those could trigger an interrupt storm and
> call tpm_tis_revert_interrupts(), which calls schedule_work()?
>
>
The iteration stops as soon as there is an interrupt found that "works" (i.e.
as soon as one interrupt fires, see the "irq test" in tpm_tis_send()). If this
irq starts a storm it is handled by the implemented irq storm handling and
deactivated. No other interrupts are activated afterwards. So no,
I do not see that multiple interrupt storms are possible at the same time.
Regards,
Lino
next prev parent reply other threads:[~2024-02-02 1:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-01 11:36 [PATCH] tpm,tpm_tis: Avoid warning splat at shutdown Lino Sanfilippo
2024-02-01 16:40 ` Elliott, Robert (Servers)
2024-02-01 23:18 ` Jarkko Sakkinen
2024-02-02 1:13 ` Lino Sanfilippo [this message]
2024-02-01 23:03 ` Jarkko Sakkinen
2024-03-05 15:43 ` Paul Menzel
2024-03-07 20:05 ` Jarkko Sakkinen
2024-03-07 20:33 ` Paul Menzel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cc182e56-d0de-4a47-bc0a-d0c830649166@kunbus.com \
--to=l.sanfilippo@kunbus.com \
--cc=LinoSanfilippo@gmx.de \
--cc=elliott@hpe.com \
--cc=jarkko@kernel.org \
--cc=jgg@ziepe.ca \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lukas@wunner.de \
--cc=p.rosenberger@kunbus.com \
--cc=peterhuewe@gmx.de \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox