linux-kselftest.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] kunit: Fix some bugs in kunit_filter_suites()
@ 2023-08-31  7:16 Jinjie Ruan
  2023-08-31  7:16 ` [PATCH 1/4] kunit: Fix wild-memory-access bug in kunit_free_suite_set() Jinjie Ruan
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Jinjie Ruan @ 2023-08-31  7:16 UTC (permalink / raw)
  To: brendan.higgins, davidgow, skhan, jk, dlatypov, rmoar,
	linux-kselftest, kunit-dev
  Cc: ruanjinjie

The state handle in kunit_module_notify() is not correct when
the mod->state switch from MODULE_STATE_COMING to MODULE_STATE_GOING.

And it's necessary to check NULL for kzalloc() in
kunit_parse_glob_filter().

The order in which memory is released in err path in kunit_filter_suites()
is also problematic.

And there is a possible memory leak in kunit_filter_suites().

This patchset fix the above issues.

Jinjie Ruan (4):
  kunit: Fix wild-memory-access bug in kunit_free_suite_set()
  kunit: Fix possible null-ptr-deref in kunit_parse_glob_filter()
  kunit: Fix possible memory leak in kunit_filter_suites()
  kunit: Fix the wrong error path in kunit_filter_suites()

 lib/kunit/executor.c | 39 +++++++++++++++++++++++++++------------
 lib/kunit/test.c     |  3 ++-
 2 files changed, 29 insertions(+), 13 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2023-09-03  6:37 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-31  7:16 [PATCH 0/4] kunit: Fix some bugs in kunit_filter_suites() Jinjie Ruan
2023-08-31  7:16 ` [PATCH 1/4] kunit: Fix wild-memory-access bug in kunit_free_suite_set() Jinjie Ruan
2023-08-31 20:29   ` Rae Moar
2023-09-01  5:17   ` David Gow
2023-08-31  7:16 ` [PATCH 2/4] kunit: Fix possible null-ptr-deref in kunit_parse_glob_filter() Jinjie Ruan
2023-08-31 20:34   ` Rae Moar
2023-09-01  5:18   ` David Gow
2023-08-31  7:16 ` [PATCH 3/4] kunit: Fix possible memory leak in kunit_filter_suites() Jinjie Ruan
2023-08-31 21:01   ` Rae Moar
2023-09-01  5:18   ` David Gow
2023-08-31  7:16 ` [PATCH 4/4] kunit: Fix the wrong error path " Jinjie Ruan
2023-08-31 21:03   ` Rae Moar
2023-09-01  5:18   ` David Gow
2023-09-03  6:37     ` Ruan Jinjie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).