Print this page
smatch clean rtld


 702 void
 703 _audit_objclose(APlist *list, Rt_map *lmp)
 704 {
 705         Audit_list      *alp;
 706         Aliste          idx;
 707         Lm_list         *lml = LIST(lmp);
 708 
 709         for (APLIST_TRAVERSE(list, idx, alp)) {
 710                 Audit_client    *acp;
 711                 Rt_map          *almp = alp->al_lmp;
 712                 Lm_list         *alml = LIST(almp);
 713 
 714                 if (alp->al_objclose == NULL)
 715                         continue;
 716                 if ((acp = _audit_client(AUDINFO(lmp), almp)) == NULL)
 717                         continue;
 718 
 719                 DBG_CALL(Dbg_audit_objclose(lml, alp->al_libname, NAME(lmp)));
 720 
 721                 leave(alml, thr_flg_reenter);
 722                 (*alp->al_objclose)(&(acp->ac_cookie));
 723                 (void) enter(thr_flg_reenter);
 724         }
 725 }
 726 
 727 /*
 728  * Determine any la_objclose() requirements.  An object that is about to be
 729  * deleted needs to trigger an la_objclose() event to any associated auditors.
 730  * In the case of local auditing, a deleted object may have a number of callers,
 731  * and each of these callers may have their own auditing requirements.  To
 732  * ensure only one la_objclose() event is sent to each auditor, collect the
 733  * auditors from any callers and make sure there's no duplication.
 734  */
 735 inline static void
 736 add_objclose_list(Rt_map *lmp, APlist **alpp)
 737 {
 738         if (AFLAGS(lmp) & LML_TFLG_AUD_OBJCLOSE) {
 739                 Audit_list      *alp;
 740                 Aliste          idx;
 741 
 742                 for (APLIST_TRAVERSE(AUDITORS(lmp)->ad_list, idx, alp)) {




 702 void
 703 _audit_objclose(APlist *list, Rt_map *lmp)
 704 {
 705         Audit_list      *alp;
 706         Aliste          idx;
 707         Lm_list         *lml = LIST(lmp);
 708 
 709         for (APLIST_TRAVERSE(list, idx, alp)) {
 710                 Audit_client    *acp;
 711                 Rt_map          *almp = alp->al_lmp;
 712                 Lm_list         *alml = LIST(almp);
 713 
 714                 if (alp->al_objclose == NULL)
 715                         continue;
 716                 if ((acp = _audit_client(AUDINFO(lmp), almp)) == NULL)
 717                         continue;
 718 
 719                 DBG_CALL(Dbg_audit_objclose(lml, alp->al_libname, NAME(lmp)));
 720 
 721                 leave(alml, thr_flg_reenter);
 722                 (void) (*alp->al_objclose)(&(acp->ac_cookie));
 723                 (void) enter(thr_flg_reenter);
 724         }
 725 }
 726 
 727 /*
 728  * Determine any la_objclose() requirements.  An object that is about to be
 729  * deleted needs to trigger an la_objclose() event to any associated auditors.
 730  * In the case of local auditing, a deleted object may have a number of callers,
 731  * and each of these callers may have their own auditing requirements.  To
 732  * ensure only one la_objclose() event is sent to each auditor, collect the
 733  * auditors from any callers and make sure there's no duplication.
 734  */
 735 inline static void
 736 add_objclose_list(Rt_map *lmp, APlist **alpp)
 737 {
 738         if (AFLAGS(lmp) & LML_TFLG_AUD_OBJCLOSE) {
 739                 Audit_list      *alp;
 740                 Aliste          idx;
 741 
 742                 for (APLIST_TRAVERSE(AUDITORS(lmp)->ad_list, idx, alp)) {