diff options
author | Richard Mudgett <rmudgett@digium.com> | 2016-08-23 11:02:35 -0500 |
---|---|---|
committer | Richard Mudgett <rmudgett@digium.com> | 2016-08-25 17:11:17 -0500 |
commit | 1a7d5989d61cc76f8423fa1f9abafc56a251f537 (patch) | |
tree | c1624e63488c73011df539088c09e52f6bc3b31e /include/asterisk/channel.h | |
parent | aaef3b71751d9418e5b11824e7f9b33da5363df6 (diff) |
res_fax: Fix deadlock in ast_channel_get_t38_state().
ast_channel_get_t38_state() calls ast_channel_queryoption() with
AST_OPTION_T38_STATE. If the passed in channel is a local channel then a
deadlock can happen if a channel lock is held when called.
* Made ast_channel_get_t38_state() callers not hold a channel lock before
calling.
* Update ast_channel_get_t38_state() doxygen to note that no channel locks
can be held when calling the function.
ASTERISK-26203 #close
Reported by: Etienne Lessard
ASTERISK-24822 #close
Reported by: David Brillert
ASTERISK-22732 #close
Reported by: Richard Mudgett
Change-Id: I49fd76fa9af628b4198009b5c0b82c8b03681214
Diffstat (limited to 'include/asterisk/channel.h')
-rw-r--r-- | include/asterisk/channel.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/include/asterisk/channel.h b/include/asterisk/channel.h index 14bd32c07..3293dd77b 100644 --- a/include/asterisk/channel.h +++ b/include/asterisk/channel.h @@ -2549,7 +2549,11 @@ static inline int ast_fdisset(struct pollfd *pfds, int fd, int maximum, int *sta return 0; } -/*! \brief Retrieves the current T38 state of a channel */ +/*! + * \brief Retrieves the current T38 state of a channel + * + * \note Absolutely _NO_ channel locks should be held before calling this function. + */ static inline enum ast_t38_state ast_channel_get_t38_state(struct ast_channel *chan) { enum ast_t38_state state = T38_STATE_UNAVAILABLE; |