Skip to content

Commit 8cd876e

Browse files
groeckEric Biggers
authored andcommitted
lib/crypto: tests: Annotate worker to be on stack
The following warning traceback is seen if object debugging is enabled with the new crypto test code. ODEBUG: object 9000000106237c50 is on stack 9000000106234000, but NOT annotated. ------------[ cut here ]------------ WARNING: lib/debugobjects.c:655 at lookup_object_or_alloc.part.0+0x19c/0x1f4, CPU#0: kunit_try_catch/468 ... This also results in a boot stall when running the code in qemu:loongarch. Initializing the worker with INIT_WORK_ONSTACK() fixes the problem. Fixes: 950a812 ("lib/crypto: tests: Add hash-test-template.h and gen-hash-testvecs.py") Signed-off-by: Guenter Roeck <linux@roeck-us.net> Acked-by: Ard Biesheuvel <ardb@kernel.org> Link: https://lore.kernel.org/r/20250721231917.3182029-1-linux@roeck-us.net Signed-off-by: Eric Biggers <ebiggers@kernel.org>
1 parent 66b1306 commit 8cd876e

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/crypto/tests/hash-test-template.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ static void run_irq_test(struct kunit *test, bool (*func)(void *),
398398
*/
399399
hrtimer_setup_on_stack(&state.timer, hash_irq_test_timer_func,
400400
CLOCK_MONOTONIC, HRTIMER_MODE_REL_HARD);
401-
INIT_WORK(&state.bh_work, hash_irq_test_bh_work_func);
401+
INIT_WORK_ONSTACK(&state.bh_work, hash_irq_test_bh_work_func);
402402

403403
/* Run for up to max_iterations or 1 second, whichever comes first. */
404404
end_jiffies = jiffies + HZ;

0 commit comments

Comments
 (0)