On 7/22/15 6:08 PM, Wangnan (F) wrote:
Then we should find another way to prevent user create a large map but only use a small portion of it, since normal array map can't report whether a slot is used or not. When releasing the map, we have to release each perf event. Currently the only way is to check map value in each slot.
yeah. In prog_array each element is either NULL ptr or valid 'struct bpf_prog *'. Why not to do the same for perf_event_array? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

