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

Mark Murawski asteriskteam at digium.com
Wed Aug 25 13:44:30 CDT 2021


Mark Murawski has uploaded this change for review. ( https://gerrit.asterisk.org/c/asterisk/+/16358 )


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

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

Currently pbx_ael does not check if a reload is currently pending
before proceeding with a reload. This can cause multiple threads to
operate at the same time on what should be mutex protected data. This
change adds protection to reloading to ensure only one ael reload is
executing at a time.

ASTERISK-29609 #close

Change-Id: I5ed392ad226f6e4e7696ad742076d3e45c57af35
---
M pbx/pbx_ael.c
1 file changed, 4 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/58/16358/1

diff --git a/pbx/pbx_ael.c b/pbx/pbx_ael.c
index d55f2d4..91bb87f 100644
--- a/pbx/pbx_ael.c
+++ b/pbx/pbx_ael.c
@@ -245,7 +245,11 @@
 	if (a->argc != 2)
 		return CLI_SHOWUSAGE;
 
+#ifndef STANDALONE
+	return ast_module_reload("pbx_ael") == AST_MODULE_RELOAD_SUCCESS ? CLI_SUCCESS : CLI_FAILURE;
+#else
 	return (pbx_load_module() ? CLI_FAILURE : CLI_SUCCESS);
+#endif
 }
 
 static struct ast_cli_entry cli_ael[] = {

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

Gerrit-Project: asterisk
Gerrit-Branch: 19
Gerrit-Change-Id: I5ed392ad226f6e4e7696ad742076d3e45c57af35
Gerrit-Change-Number: 16358
Gerrit-PatchSet: 1
Gerrit-Owner: Mark Murawski <markm at intellasoft.net>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20210825/ee3e0625/attachment.html>


More information about the asterisk-code-review mailing list