From: Charles Keepax <ckeepax@opensource.cirrus.com>
To: broonie@kernel.org
Cc: lgirdwood@gmail.com, linux-sound@vger.kernel.org,
patches@opensource.cirrus.com
Subject: [PATCH] ASoC: wm_adsp: Fix crash in kunit tests on arm64
Date: Wed, 18 Mar 2026 10:38:13 +0000 [thread overview]
Message-ID: <20260318103813.249190-1-ckeepax@opensource.cirrus.com> (raw)
Several of the wm_adsp kunit tests failed by only on arm64. This
turns out to be passing things to release_firmware which were not
allocated with request_firmware. This does actually drop some
errors on other platforms but somehow doesn't cause the tests to
fail, and kunit hides a lot of the output for passing tests.
There is a comment in the code regarding this exact thing in
wm_adsp_fw_find_test_case_exit(), but then it goes on and
does it anyway. I suspect maybe there was a plan to override
wm_adsp_release_firmware_files() that got forgotten, as the
function appears to have hooks for kunit that aren't used. Anyway
for now implement a simple fix of freeing the filenames
locally. It is likely a more detailed fix will be implemented in
the near future but this should get things moving again.
Fixes: bf2d44d07de7 ("ASoC: wm_adsp: Add kunit test for firmware file search")
Signed-off-by: Charles Keepax <ckeepax@opensource.cirrus.com>
---
sound/soc/codecs/wm_adsp_fw_find_test.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/wm_adsp_fw_find_test.c b/sound/soc/codecs/wm_adsp_fw_find_test.c
index 44c26e991b359..fb886dc61c27a 100644
--- a/sound/soc/codecs/wm_adsp_fw_find_test.c
+++ b/sound/soc/codecs/wm_adsp_fw_find_test.c
@@ -262,7 +262,8 @@ static void wm_adsp_fw_find_test_case_exit(struct kunit *test)
* dummies not allocated by the real request_firmware() call they
* must not be passed to release_firmware().
*/
- wm_adsp_release_firmware_files(&priv->found_fw);
+ kfree(priv->found_fw.wmfw.filename);
+ kfree(priv->found_fw.coeff.filename);
}
static void wm_adsp_fw_find_test_param_desc(const struct wm_adsp_fw_find_test_params *param,
--
2.47.3
next reply other threads:[~2026-03-18 10:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-18 10:38 Charles Keepax [this message]
2026-03-18 11:36 ` [PATCH] ASoC: wm_adsp: Fix crash in kunit tests on arm64 Mark Brown
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=20260318103813.249190-1-ckeepax@opensource.cirrus.com \
--to=ckeepax@opensource.cirrus.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-sound@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
/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