Files
George Joseph 6c494ca204 channelstorage: Allow storage driver read locking to be skipped.
After PR #1498 added read locking to channelstorage_cpp_map_name_id, if ARI
channels/externalMedia was called with a custom channel id AND the
cpp_map_name_id channel storage backend is in use, a deadlock can occur when
hanging up the channel. It's actually triggered in
channel.c:__ast_channel_alloc_ap() when it gets a write lock on the
channelstorage driver then subsequently does a lookup for channel uniqueid
which now does a read lock. This is an invalid operation and causes the lock
state to get "bad". When the channels try to hang up, a write lock is
attempted again which hangs and causes the deadlock.

Now instead of the cpp_map_name_id channelstorage driver "get" APIs
automatically performing a read lock, they take a "lock" parameter which
allows a caller who already has a write lock to indicate that the "get" API
must not attempt its own lock.  This prevents the state from getting mesed up.

The ao2_legacy driver uses the ao2 container's recursive mutex so doesn't
have this issue but since it also implements the common channelstorage API,
it needed its "get" implementations updated to take the lock parameter. They
just don't use it.

Resolves: #1578
2025-11-12 21:27:16 +00:00
..
2025-02-20 21:46:28 +00:00
2021-11-15 17:33:27 -06:00
2025-02-20 21:46:28 +00:00
2025-02-20 21:46:28 +00:00
2025-02-20 21:46:28 +00:00
2023-12-08 13:11:51 +00:00
2025-02-20 21:46:28 +00:00
2023-12-08 13:11:51 +00:00
2025-02-20 21:46:28 +00:00
2021-12-02 15:02:09 -06:00
2021-12-02 15:02:09 -06:00
2021-12-02 15:02:09 -06:00
2020-04-06 10:23:20 -05:00
2021-12-02 15:02:09 -06:00
2021-12-02 15:02:09 -06:00
2025-01-16 15:32:50 +00:00
2025-02-20 21:46:28 +00:00
2025-02-20 21:46:28 +00:00
2025-08-06 15:37:46 +00:00
2025-02-20 21:46:28 +00:00
2021-12-02 15:02:09 -06:00
2022-07-07 08:19:14 -05:00
2025-02-20 21:46:28 +00:00
2025-02-20 21:46:28 +00:00
2023-01-10 14:07:44 -06:00
2021-12-02 15:02:09 -06:00
2020-06-10 09:33:28 -05:00
2021-12-02 15:02:09 -06:00
2025-02-20 21:46:28 +00:00
2025-02-20 21:46:28 +00:00
2024-08-12 15:21:33 +00:00
2021-12-02 15:02:09 -06:00
2021-11-15 17:33:27 -06:00
2021-11-15 17:33:27 -06:00
2025-04-21 13:29:28 +00:00
2021-12-02 15:02:09 -06:00
2025-04-02 12:16:35 +00:00
2025-01-29 14:18:21 +00:00
2025-01-29 14:18:21 +00:00
2025-05-07 16:47:01 +00:00
2025-01-29 14:18:21 +00:00
2025-01-29 14:18:21 +00:00
2025-04-21 13:29:28 +00:00
2021-12-02 15:02:09 -06:00
2025-02-20 21:46:28 +00:00
2021-12-02 15:02:09 -06:00
2025-01-29 14:18:21 +00:00
2025-02-20 21:46:28 +00:00
2021-12-02 15:02:09 -06:00
2021-12-02 15:02:09 -06:00
2025-02-20 21:46:28 +00:00
2025-01-29 14:18:21 +00:00
2025-02-20 21:46:28 +00:00
2025-01-29 14:18:21 +00:00
2021-12-02 15:02:09 -06:00
2016-10-27 09:53:55 -04:00
2021-11-15 17:33:27 -06:00
2021-12-02 15:02:09 -06:00
2021-11-18 14:46:42 -06:00
2025-01-29 14:18:21 +00:00
2025-01-29 14:18:21 +00:00
2025-02-20 21:46:28 +00:00
2025-06-02 16:35:27 +00:00
2025-02-20 21:46:28 +00:00
2016-10-27 09:53:55 -04:00
2021-12-02 15:02:09 -06:00
2021-12-02 15:02:09 -06:00
2022-03-24 12:00:58 -05:00
2025-02-20 21:46:28 +00:00
2021-12-02 15:02:09 -06:00
2025-02-20 21:46:28 +00:00