[Asterisk-code-review] pbx_ael: Fix crash and lockup issue regarding 'ael reload' (asterisk[18.7])

Joshua Colp asteriskteam at digium.com
Mon Oct 11 13:33:06 CDT 2021


Joshua Colp has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/16602 )

Change subject: pbx_ael:  Fix crash and lockup issue regarding 'ael reload'
......................................................................

pbx_ael:  Fix crash and lockup issue regarding 'ael reload'

Avoid infinite recursion and crash

Change-Id: I8ed05ec3aa2806c50c77edc5dd0cd4e4fa08b3f4
(cherry picked from commit e091aa276348d7f8673ce78b29e8f157c73ce90a)
---
M pbx/pbx_ael.c
1 file changed, 1 insertion(+), 6 deletions(-)

Approvals:
  Sean Bright: Looks good to me, but someone else must approve
  Joshua Colp: Looks good to me, approved; Approved for Submit



diff --git a/pbx/pbx_ael.c b/pbx/pbx_ael.c
index 8bf3af0..ed1c23d 100644
--- a/pbx/pbx_ael.c
+++ b/pbx/pbx_ael.c
@@ -280,13 +280,8 @@
 
 static int reload(void)
 {
-#ifndef STANDALONE
-	/* Lock-Protected reload.  It is VERY BAD to have simultaneous ael pbx_load_module() executing at the same time */
-	return ast_module_reload("pbx_ael") == AST_MODULE_RELOAD_SUCCESS ? AST_MODULE_LOAD_SUCCESS : AST_MODULE_LOAD_DECLINE;
-#else
-	/* Lock-Protected reload not needed (and not available) when running standalone (Example: via aelparse cli tool).  No reload contention is possible */
+	/* Lock-Protected reload not needed because we're already being called from ast_module_reload() */
 	return pbx_load_module();
-#endif
 }
 
 #ifdef STANDALONE

-- 
To view, visit https://gerrit.asterisk.org/c/asterisk/+/16602
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 18.7
Gerrit-Change-Id: I8ed05ec3aa2806c50c77edc5dd0cd4e4fa08b3f4
Gerrit-Change-Number: 16602
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: Sean Bright <sean at seanbright.com>
Gerrit-CC: Mark Murawski <markm at intellasoft.net>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20211011/e7b54803/attachment.html>


More information about the asterisk-code-review mailing list