diff options
author | Arnd Bergmann <arnd@arndb.de> | 2025-09-02 16:03:26 +0200 |
---|---|---|
committer | Petr Mladek <pmladek@suse.com> | 2025-09-10 17:18:37 +0200 |
commit | bf42df09b6aa4ebb596ecba66cf35b75362b55c7 (patch) | |
tree | 3c502a06a804eb92596c8ecbd878e5cd08cf2682 /rust/helpers/of.c | |
parent | d18d7989e3da1f2753d49cb24d916f357e340f76 (diff) |
printk: kunit: support offstack cpumask
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 <arnd@arndb.de>
Link: https://lore.kernel.org/all/20250620192554.2234184-1-arnd@kernel.org # v1
[pmladek@suse.com: Correctly handle allocation failures and freeing using KUnit test API.]
Link: https://lore.kernel.org/all/20250702095157.110916-3-pmladek@suse.com # v2
Signed-off-by: Petr Mladek <pmladek@suse.com>
Diffstat (limited to 'rust/helpers/of.c')
0 files changed, 0 insertions, 0 deletions