]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
kunit/fortify: Fix mismatched kvalloc()/vfree() usage
authorKees Cook <keescook@chromium.org>
Thu, 25 Apr 2024 23:06:22 +0000 (16:06 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 30 May 2024 07:49:02 +0000 (09:49 +0200)
commit42d21c9727028fe7ee392223ba127484b1b8677e
tree923611208cf2cc97ad85b050e75d689145176e53
parent067e296679db995b43f333b1eb48ad1a78dc03e1
kunit/fortify: Fix mismatched kvalloc()/vfree() usage

[ Upstream commit 998b18072ceb0613629c256b409f4d299829c7ec ]

The kv*() family of tests were accidentally freeing with vfree() instead
of kvfree(). Use kvfree() instead.

Fixes: 9124a2640148 ("kunit/fortify: Validate __alloc_size attribute results")
Link: https://lore.kernel.org/r/20240425230619.work.299-kees@kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
lib/fortify_kunit.c