From: Eric Biggers <ebiggers@kernel.org>
To: linux-crypto@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Ard Biesheuvel <ardb@kernel.org>,
"Jason A . Donenfeld" <Jason@zx2c4.com>,
Herbert Xu <herbert@gondor.apana.org.au>,
kunit-dev@googlegroups.com,
Brendan Higgins <brendan.higgins@linux.dev>,
David Gow <davidgow@google.com>, Rae Moar <raemoar63@gmail.com>,
stable@vger.kernel.org
Subject: Re: [PATCH] kunit: irq: Ensure timer doesn't fire too frequently
Date: Tue, 24 Feb 2026 14:46:30 -0800 [thread overview]
Message-ID: <20260224224630.GA130365@quark> (raw)
In-Reply-To: <20260224033751.97615-1-ebiggers@kernel.org>
On Mon, Feb 23, 2026 at 07:37:51PM -0800, Eric Biggers wrote:
> Fix a bug where kunit_run_irq_test() could hang if the system is too
> slow. This was noticed with the crypto library tests in certain VMs.
>
> Specifically, if kunit_irq_test_timer_func() and the associated hrtimer
> code took over 5us to run, then the CPU would spend all its time
> executing that code in hardirq context. As a result, the task executing
> kunit_run_irq_test() never had a chance to run, exit the loop, and
> cancel the timer.
>
> To fix it, make kunit_irq_test_timer_func() increase the timer interval
> when the other contexts aren't having a chance to run.
>
> Fixes: 950a81224e8b ("lib/crypto: tests: Add hash-test-template.h and gen-hash-testvecs.py")
> Cc: stable@vger.kernel.org
> Signed-off-by: Eric Biggers <ebiggers@kernel.org>
> ---
>
> This patch applies to v7.0-rc1 and is targeting libcrypto-fixes
>
> include/kunit/run-in-irq-context.h | 44 +++++++++++++++++++-----------
> 1 file changed, 28 insertions(+), 16 deletions(-)
Applied to https://git.kernel.org/pub/scm/linux/kernel/git/ebiggers/linux.git/log/?h=libcrypto-fixes
(Additional reviews always appreciated, of course)
- Eric
prev parent reply other threads:[~2026-02-24 22:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-24 3:37 [PATCH] kunit: irq: Ensure timer doesn't fire too frequently Eric Biggers
2026-02-24 9:01 ` David Gow
2026-02-24 22:46 ` Eric Biggers [this message]
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=20260224224630.GA130365@quark \
--to=ebiggers@kernel.org \
--cc=Jason@zx2c4.com \
--cc=ardb@kernel.org \
--cc=brendan.higgins@linux.dev \
--cc=davidgow@google.com \
--cc=herbert@gondor.apana.org.au \
--cc=kunit-dev@googlegroups.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=raemoar63@gmail.com \
--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