The patch titled Subject: lib/list-test: add a test for the 'list' doubly linked list has been removed from the -mm tree. Its filename was lib-list-test-add-a-test-for-the-list-doubly-linked-list-v3.patch This patch was dropped because it is obsolete ------------------------------------------------------ From: David Gow <davidgow@xxxxxxxxxx> Subject: lib/list-test: add a test for the 'list' doubly linked list This revision fixes some issues with the memory allocation in the 'list_test_list_init' test. In particular, it uses a KUnit assert to verify that the lists allocated with kmalloc() and kzalloc() are non-NULL (and also properly passes GFP_KERNEL to them). Link: http://lkml.kernel.org/r/20191016215707.95317-1-davidgow@xxxxxxxxxx Signed-off-by: David Gow <davidgow@xxxxxxxxxx> Cc: Shuah Khan <shuah@xxxxxxxxxx> Cc: Brendan Higgins <brendanhiggins@xxxxxxxxxx> Cc: Kees Cook <keescook@xxxxxxxxxxxx> Cc: Dan Carpenter <dan.carpenter@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- lib/list-test.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) --- a/lib/list-test.c~lib-list-test-add-a-test-for-the-list-doubly-linked-list-v3 +++ a/lib/list-test.c @@ -25,10 +25,12 @@ static void list_test_list_init(struct k INIT_LIST_HEAD(&list2); - list4 = kzalloc(sizeof(*list4), 0); + list4 = kzalloc(sizeof(*list4), GFP_KERNEL); + KUNIT_ASSERT_NOT_ERR_OR_NULL(test, list4); INIT_LIST_HEAD(list4); - list5 = kmalloc(sizeof(*list5), 0); + list5 = kmalloc(sizeof(*list5), GFP_KERNEL); + KUNIT_ASSERT_NOT_ERR_OR_NULL(test, list5); memset(list5, 0xFF, sizeof(*list5)); INIT_LIST_HEAD(list5); @@ -665,7 +667,7 @@ static void list_test_list_for_each_entr KUNIT_EXPECT_EQ(test, cur->data, i); i++; } - + KUNIT_EXPECT_EQ(test, i, 5); } @@ -686,7 +688,7 @@ static void list_test_list_for_each_entr KUNIT_EXPECT_EQ(test, cur->data, i); i--; } - + KUNIT_EXPECT_EQ(test, i, -1); } _ Patches currently in -mm which might be from davidgow@xxxxxxxxxx are