Hi, team. I'm reading acl-plugin code and have a question on race condition. When vpp needs to update acl rules, it does not keep a refcnt or something and just `vec_free`s the rules. Is it safe?: ``` /* ACL updater: from acl_add_list() */ { a = am->acls + *acl_list_index; /* Get rid of the old rules */ if (a->rules) vec_free (a->rules); /* (A) */ } ...
/* ACL user: from single_acl_match_5tuple() */ for (i = 0; i < vec_len(acl_rules); i++) { r = &acl_rules[i]; ... /* (B) */ ``` I worry that vpp can SEGV by refering freed memory when it referes an acl rules `r` in (B) while another thread frees the rule in (A). Best regards, Chul-Woong
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#22313): https://lists.fd.io/g/vpp-dev/message/22313 Mute This Topic: https://lists.fd.io/mt/95613760/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/leave/1480452/21656/631435203/xyzzy [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-