From: "Jarkko Sakkinen" <jarkko@kernel.org>
To: "Paul Menzel" <pmenzel@molgen.mpg.de>,
"Lino Sanfilippo" <l.sanfilippo@kunbus.com>
Cc: <peterhuewe@gmx.de>, <LinoSanfilippo@gmx.de>,
<p.rosenberger@kunbus.com>, <lukas@wunner.de>, <jgg@ziepe.ca>,
<linux-integrity@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<stable@vger.kernel.org>
Subject: Re: [PATCH] tpm,tpm_tis: Avoid warning splat at shutdown
Date: Thu, 07 Mar 2024 22:05:46 +0200 [thread overview]
Message-ID: <CZNSDUEJ4P9S.235D7ZCOV738N@kernel.org> (raw)
In-Reply-To: <84dd5c01-906c-4e13-9d8c-e5350f718d56@molgen.mpg.de>
On Tue Mar 5, 2024 at 5:43 PM EET, Paul Menzel wrote:
> Dear Lino,
>
>
> Thank you for the patch.
>
> Am 01.02.24 um 12:36 schrieb Lino Sanfilippo:
> > 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.
> >
> > cc: stable@vger.kernel.org
> > Fixes: 481c2d14627d ("tpm,tpm_tis: Disable interrupts after 1000 unhandled IRQs")
> > Reported-by: Jarkko Sakkinen <jarkko@kernel.org>
> > Closes: https://lore.kernel.org/all/CX32RFOMJUQ0.3R4YCL9MDCB96@kernel.org/
> > Signed-off-by: Lino Sanfilippo <l.sanfilippo@kunbus.com>
> > ---
> > drivers/char/tpm/tpm_tis_core.c | 3 +--
> > 1 file changed, 1 insertion(+), 2 deletions(-)
> >
> > diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c
> > index 1b350412d8a6..64c875657687 100644
> > --- a/drivers/char/tpm/tpm_tis_core.c
> > +++ b/drivers/char/tpm/tpm_tis_core.c
> > @@ -919,8 +919,6 @@ static int tpm_tis_probe_irq_single(struct tpm_chip *chip, u32 intmask,
> > int rc;
> > u32 int_status;
> >
> > - INIT_WORK(&priv->free_irq_work, tpm_tis_free_irq_func);
> > -
> > rc = devm_request_threaded_irq(chip->dev.parent, irq, NULL,
> > tis_int_handler, IRQF_ONESHOT | flags,
> > dev_name(&chip->dev), chip);
> > @@ -1132,6 +1130,7 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq,
> > priv->phy_ops = phy_ops;
> > priv->locality_count = 0;
> > mutex_init(&priv->locality_count_mutex);
> > + INIT_WORK(&priv->free_irq_work, tpm_tis_free_irq_func);
> >
> > dev_set_drvdata(&chip->dev, priv);
>
> This is commit d6fb14208e22 in jarkko/next.
>
> I tested this patch on top of Linux 6.8-rc7 on a Dell OptiPlex 5055 [1]
> and it fixes the issue there too.
Thanks!
If you don't mind I'll add your tested-by to the commit before I send
my next pull request to Linus?
BR, Jarkko
next prev parent reply other threads:[~2024-03-07 20:05 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
2024-02-01 23:03 ` Jarkko Sakkinen
2024-03-05 15:43 ` Paul Menzel
2024-03-07 20:05 ` Jarkko Sakkinen [this message]
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=CZNSDUEJ4P9S.235D7ZCOV738N@kernel.org \
--to=jarkko@kernel.org \
--cc=LinoSanfilippo@gmx.de \
--cc=jgg@ziepe.ca \
--cc=l.sanfilippo@kunbus.com \
--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=pmenzel@molgen.mpg.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