On Thu, Jul 6, 2017 at 6:35 PM, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote: >> >> Basiclly, the parent DO_FOR_EACH() has __nr caching the >> current ptr position. When the inner loop function delete >> one entry before the current position. The parent current >> position needs to be adjust, because the entry[] has been >> move forward. > > Gaah. > > I think the original idea for this was to call pack_ptr_list() only at > the end of all the list traversal that could delete things. Actually, the point I am making is different than pack_ptr_list(). I just take a closer look. Pack_ptr_list() only remove empty ptr nodes. It does not take care my realization that entry[] array sliding forward causing the parent for loop *missing* ptr entry. Basically the parent for loop will skip some ptr entry. It is s very subtle and hard to discover. Chris -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html