Re: [PATCH v2] kunit: Fix potential null dereference in kunit_device_driver_test()

2024-11-15 Thread David Gow
On Fri, 15 Nov 2024 at 13:43, Gax-c wrote: > > From: Zichen Xie > > kunit_kzalloc() may return a NULL pointer, dereferencing it without > NULL check may lead to NULL dereference. > Add a NULL check for test_state. > > Fixes: d03c720e03bd ("kunit: Add APIs for managing devices") > Signed-off-by: Z

[PATCH v2] kunit: Fix potential null dereference in kunit_device_driver_test()

2024-11-14 Thread Gax-c
From: Zichen Xie kunit_kzalloc() may return a NULL pointer, dereferencing it without NULL check may lead to NULL dereference. Add a NULL check for test_state. Fixes: d03c720e03bd ("kunit: Add APIs for managing devices") Signed-off-by: Zichen Xie Cc: sta...@vger.kernel.org --- v2: Add Cc tag. --