diff for duplicates of <519224D8.5090704@gmail.com> diff --git a/a/2.txt b/N1/2.txt index 8b13789..6ebc1ad 100644 --- a/a/2.txt +++ b/N1/2.txt @@ -1 +1,41 @@ +>From 095c9fc03bacb14a896cc9b56c7e2e3843c6051b Mon Sep 17 00:00:00 2001 +From: Jianpeng Ma <majianpeng@gmail.com> +Date: Tue, 14 May 2013 15:36:14 +0800 +Subject: [PATCH 2/3] mm/kmemleak.c: Use list_for_each_entry_safe to + reconstruct function scan_gray_list. +Signed-off-by: Jianpeng Ma <majianpeng@gmail.com> +--- + mm/kmemleak.c | 8 +------- + 1 file changed, 1 insertion(+), 7 deletions(-) + +diff --git a/mm/kmemleak.c b/mm/kmemleak.c +index b1525db..f0ece93 100644 +--- a/mm/kmemleak.c ++++ b/mm/kmemleak.c +@@ -1225,22 +1225,16 @@ static void scan_gray_list(void) + * from inside the loop. The kmemleak objects cannot be freed from + * outside the loop because their use_count was incremented. + */ +- object = list_entry(gray_list.next, typeof(*object), gray_list); +- while (&object->gray_list != &gray_list) { ++ list_for_each_entry_safe(object, tmp, &gray_list, gray_list) { + cond_resched(); + + /* may add new objects to the list */ + if (!scan_should_stop()) + scan_object(object); + +- tmp = list_entry(object->gray_list.next, typeof(*object), +- gray_list); +- + /* remove the object from the list and release it */ + list_del(&object->gray_list); + put_object(object); +- +- object = tmp; + } + WARN_ON(!list_empty(&gray_list)); + } +-- +1.8.3.rc1.44.gb387c77 diff --git a/a/content_digest b/N1/content_digest index 7975e19..dd33f8d 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -44,5 +44,46 @@ "\01:2\0" "fn\00002-mm-kmemleak.c-Use-list_for_each_entry_safe-to-recons.patch\0" "b\0" + ">From 095c9fc03bacb14a896cc9b56c7e2e3843c6051b Mon Sep 17 00:00:00 2001\n" + "From: Jianpeng Ma <majianpeng@gmail.com>\n" + "Date: Tue, 14 May 2013 15:36:14 +0800\n" + "Subject: [PATCH 2/3] mm/kmemleak.c: Use list_for_each_entry_safe to\n" + " reconstruct function scan_gray_list.\n" + "\n" + "Signed-off-by: Jianpeng Ma <majianpeng@gmail.com>\n" + "---\n" + " mm/kmemleak.c | 8 +-------\n" + " 1 file changed, 1 insertion(+), 7 deletions(-)\n" + "\n" + "diff --git a/mm/kmemleak.c b/mm/kmemleak.c\n" + "index b1525db..f0ece93 100644\n" + "--- a/mm/kmemleak.c\n" + "+++ b/mm/kmemleak.c\n" + "@@ -1225,22 +1225,16 @@ static void scan_gray_list(void)\n" + " \t * from inside the loop. The kmemleak objects cannot be freed from\n" + " \t * outside the loop because their use_count was incremented.\n" + " \t */\n" + "-\tobject = list_entry(gray_list.next, typeof(*object), gray_list);\n" + "-\twhile (&object->gray_list != &gray_list) {\n" + "+\tlist_for_each_entry_safe(object, tmp, &gray_list, gray_list) {\n" + " \t\tcond_resched();\n" + " \n" + " \t\t/* may add new objects to the list */\n" + " \t\tif (!scan_should_stop())\n" + " \t\t\tscan_object(object);\n" + " \n" + "-\t\ttmp = list_entry(object->gray_list.next, typeof(*object),\n" + "-\t\t\t\t gray_list);\n" + "-\n" + " \t\t/* remove the object from the list and release it */\n" + " \t\tlist_del(&object->gray_list);\n" + " \t\tput_object(object);\n" + "-\n" + "-\t\tobject = tmp;\n" + " \t}\n" + " \tWARN_ON(!list_empty(&gray_list));\n" + " }\n" + "-- \n" + 1.8.3.rc1.44.gb387c77 -99958d46b7c63e0f929563d06c4bc64a7b64ab5b7ff1952621f0e29666e79ed5 +31faa37049f822bc3f08dd937c481792d2fb902d79d4e729bd74c0aefdb9cf0a
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.