Skip to contentSkip to conversation

KUnit fixes update for Linux 6.2-rc2

GIT PULL Merged Shuah Khan 2 participants 2 messages Dec 29, 2022 – Dec 30, 2022

Subsystems (2)
lore
Share & tools
lore

Shuah Khan

author maintainer
#0 lore raw

Hi Linus,

Please pull the following KUnit fixes update for Linux 6.2-rc2.

This KUnit update for Linux 6.2-rc2 consists of:

- alloc_string_stream_fragment() error path fix to free before returning a failure.

diff is attached.

thanks,
-- Shuah

----------------------------------------------------------------
The following changes since commit 1b929c02afd37871d5afb9d498426f83432e71c2:

Linux 6.2-rc1 (2022-12-25 13:41:39 -0800)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest tags/linux-kselftest-kunit-fixes-6.2-rc2

for you to fetch changes up to 93ef83050e597634d2c7dc838a28caf5137b9404:

kunit: alloc_string_stream_fragment error handling bug fix (2022-12-26 16:01:36 -0700)

----------------------------------------------------------------
linux-kselftest-kunit-fixes-6.2-rc2

This KUnit update for Linux 6.2-rc2 consists of:

- alloc_string_stream_fragment() error path fix to free before returning a failure.

----------------------------------------------------------------
YoungJun.park (1):
kunit: alloc_string_stream_fragment error handling bug fix

 lib/kunit/string-stream.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

----------------------------------------------------------------

lib/kunit/string-stream.c +3 -1
index f5f51166d8c2..cc32743c1171 100644
@@ -23,8 +23,10 @@ static struct string_stream_fragment *alloc_string_stream_fragment(
 		return ERR_PTR(-ENOMEM);
 
 	frag->fragment = kunit_kmalloc(test, len, gfp);
-	if (!frag->fragment)
+	if (!frag->fragment) {
+		kunit_kfree(test, frag);
 		return ERR_PTR(-ENOMEM);
+	}
 
 	return frag;
 }
merge bot Merged
#1 lore raw
The pull request you sent on Thu, 29 Dec 2022 16:07:21 -0700:

The pull request you sent on Thu, 29 Dec 2022 16:07:21 -0700:

Quoted 1 line

git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest tags/linux-kselftest-kunit-fixes-6.2-rc2

has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/69fb073b5ba6d7c9358a04115ed61b78c73790ce

Thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/prtracker.html