On Fri, 12 Jul 2013, Chen Gang wrote: > Since alloc_loc_track() will alloc additional space, and already knows > about 'max', so need be sure of 'max' must be larger than 't->count'. alloc_loc_track is only called if t->count > max from add_location: /* * Not found. Insert new tracking element. */ if (t->count >= t->max && !alloc_loc_track(t, 2 * t->max, GFP_ATOMIC)) return 0; > The caller may not notice about it, e.g. call from add_location() in > "mm/slub.c", which only let "max = 2 * max" when "t->count >= t->max" That call already has the condition checked before the call. The only other caller is list_locations which calls alloc_loc_track when t->count == 0 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>