path: root/xlators/features/qemu-block
diff options
authorKaushal M <>2015-07-13 16:16:00 +0530
committerKrishnan Parthasarathi <>2015-07-14 03:25:42 -0700
commit11253616203ce450b49f25df2a0f4fec0a974b41 (patch)
treefe9ff1cca16d15e9da99d4181f6b05d48b47135e /xlators/features/qemu-block
parentdd66dd9d6c249282711d56678bdfe22c2a8d0975 (diff)
rpc-transport: socket_poller fixes for proper working of mgmt encryption
Backport of 8c39f14 from master socket_poller, the polling function used by ssl own_thread, had two issues which lead to GlusterD crashes when using management encryption Issue 1 ------- socket_poller calls functions which require THIS to be set. But, THIS was being set conditionally. Because of this, functions could sometimes be called without THIS being set. For example, rpc_transport_notify could be called for an accepted client socket without THIS being set, as THIS was only set it the transport wasn't yet connected. This would cause the process to crash when THIS was accessed by the called functions. To fix this, THIS is being set at the start of socket_poller unconditionally. Issue 2 ------- DISCONNECT notify was being sent on the listener transport instead of the client transport. The DISCONNECT event was converted to a LISTENER_DEAD event in rpcsvc_handle_disconnect, as it could not find the listener socket of the listener socket. GlusterD was notified of a LISTENER_DEAD event instead of a DISCONNECT and failed to remove the client transport from its xprt_list. The transport would subsequently be freed, leaving the xprt_list with a corrupted/invalid entry. Later, when GlusterD would iterate over the xprt_list to send notifications, it would crash when the invalid entry was accessed. To fix this, DISCONNECT notification in socket_poller is sent on the client socket, as it is done in the epoll handler. Change-Id: I0370b7c6d7eb13de10ebf08d91a4a39dc7d64c7a BUG: 1242734 Signed-off-by: Kaushal M <> Reviewed-on: Tested-by: NetBSD Build System <> Tested-by: Gluster Build System <> Reviewed-by: Krishnan Parthasarathi <>
Diffstat (limited to 'xlators/features/qemu-block')
0 files changed, 0 insertions, 0 deletions