On Tue 2025-09-02 16:03:26, Petr Mladek wrote:
> From: Arnd Bergmann <a...@arndb.de>
> 
> For large values of CONFIG_NR_CPUS, the newly added kunit test fails
> to build:
> 
> kernel/printk/printk_ringbuffer_kunit_test.c: In function 'test_readerwriter':
> kernel/printk/printk_ringbuffer_kunit_test.c:279:1: error: the frame size of 
> 1432 bytes is larger than 1280 bytes [-Werror=frame-larger-than=]
> 
> Change this to use cpumask_var_t and allocate it dynamically when
> CONFIG_CPUMASK_OFFSTACK is set.
> 
> The variable has to be released via a KUnit action wrapper so that it is
> freed when the test fails and gets aborted. The parameter type is hardcoded
> to "struct cpumask *" because the macro KUNIT_DEFINE_ACTION_WRAPPER()
> does not accept an array. But the function does nothing when
> CONFIG_CPUMASK_OFFSTACK is not set anyway.
> 
> Fixes: 5ea2bcdfbf46 ("printk: ringbuffer: Add KUnit test")
> Signed-off-by: Arnd Bergmann <a...@arndb.de>
> [pmla...@suse.com: Correctly handle allocation failures and freeing using 
> KUnit test API.]
> Signed-off-by: Petr Mladek <pmla...@suse.com>

JFYI, this patch have been committed into printk/linux.git,
branch rework/ringbuffer-kunit-test.

It worked, I did it according to the feedback. Let's give
it some spin in linux-next before the next merge window.

Feel free to ask me to revert it, ...

Best Regards,
Petr

Reply via email to