The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Stefan Wahren <wahrenst@gmx.net>
To: Jarkko Sakkinen <jarkko@kernel.org>, linux-integrity@vger.kernel.org
Cc: 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: Sun, 10 May 2026 22:45:52 +0200	[thread overview]
Message-ID: <033c013e-8b32-4459-9dc9-255232d1d2d7@gmx.net> (raw)
In-Reply-To: <20260509185108.2681198-1-jarkko@kernel.org>

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>

  reply	other threads:[~2026-05-10 20:45 UTC|newest]

Thread overview: 3+ 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 [this message]
2026-05-11  8:10 ` Linus Walleij

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=033c013e-8b32-4459-9dc9-255232d1d2d7@gmx.net \
    --to=wahrenst@gmx.net \
    --cc=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 \
    /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