All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jarkko Sakkinen <jarkko@kernel.org>
To: Stefan Wahren <wahrenst@gmx.net>
Cc: linux-integrity@vger.kernel.org, stable@vger.kernel.org,
	Linus Walleij <linusw@kernel.org>,
	Peter Huewe <peterhuewe@gmx.de>, Jason Gunthorpe <jgg@ziepe.ca>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tpm: tpm_tis_spi: Use wait_woken() in wait_for_tmp_stat()
Date: Sat, 16 May 2026 01:40:51 +0300	[thread overview]
Message-ID: <ageg87skNHEzLFlU@kernel.org> (raw)
In-Reply-To: <033c013e-8b32-4459-9dc9-255232d1d2d7@gmx.net>

On Sun, May 10, 2026 at 10:45:52PM +0200, Stefan Wahren wrote:
> Am 09.05.26 um 20:51 schrieb Jarkko Sakkinen:
> > wait_event_interruptible_timeout() evaluates its condition after setting
> > the current task state to TASK_INTERRUPTIBLE.
> > 
> > With CONFIG_DEBUG_ATOMIC_SLEEP this triggers a warning when the IRQ wait
> > path is used:
> > 
> >      tpm_tis_status()
> >        tpm_tis_spi_read_bytes()
> >          tpm_tis_spi_transfer_full()
> >            spi_bus_lock()
> >              mutex_lock()
> > 
> > Address this with the following measures:
> > 
> > 1. Call wait_tpm_stat_cond() only while tasking is running.
> > 2. Use wait_woken() to wait for changes.
> > 
> > Cc: stable@vger.kernel.org # v4.19+
> > Cc: Linus Walleij <linusw@kernel.org>
> > Reported-by: Stefan Wahren <wahrenst@gmx.net>
> > Closes: https://lore.kernel.org/linux-integrity/6964bec7-3dbb-453b-89ef-9b990217a8b9@gmx.net/
> > Fixes: 1a339b658d9d ("tpm_tis_spi: Pass the SPI IRQ down to the driver")
> > Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
> > 
> The issue isn't reproducible anymore. Thanks
> 
> Tested-by: Stefan Wahren <wahrenst@gmx.net>

Thank you.

BR, Jarkko

  reply	other threads:[~2026-05-15 22:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-09 18:51 [PATCH] tpm: tpm_tis_spi: Use wait_woken() in wait_for_tmp_stat() Jarkko Sakkinen
2026-05-10 20:45 ` Stefan Wahren
2026-05-15 22:40   ` Jarkko Sakkinen [this message]
2026-05-11  8:10 ` Linus Walleij
2026-05-15 22:41   ` Jarkko Sakkinen

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=ageg87skNHEzLFlU@kernel.org \
    --to=jarkko@kernel.org \
    --cc=jgg@ziepe.ca \
    --cc=linusw@kernel.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=peterhuewe@gmx.de \
    --cc=stable@vger.kernel.org \
    --cc=wahrenst@gmx.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.