msg_channel: Fix a 100% CPU loop
authorVolker Lendecke <vl@samba.org>
Tue, 10 Jun 2014 14:21:07 +0000 (14:21 +0000)
committerKarolin Seeger <kseeger@samba.org>
Tue, 1 Jul 2014 07:15:51 +0000 (09:15 +0200)
commit8a62b81170b4e158e6592c1ca60470113e744e8f
treec6414a5af4d7a91d2b985071d185f2b7569b9705
parenta25becd1458c02a2a9d14eb296e63a7bbc86b85b
msg_channel: Fix a 100% CPU loop

In a ctdb setup, msg_read_got_ctdb did not set channel->pending_req to
NULL. In smbXsrv_session_close_loop in any error condition this leads to
a 100% loop. smbXsrv_session_close_loop continously retries, but because
close_channel->pending_req is != NULL, msg_read_send will always return
EBUSY, making smbXsrv_session_close_loop retry infinitely.

This patch makes sure that msg_read_got_ctdb correctly NULLs out pending_req.

msg_channel.c does not exist in master anymore, so this patch is 4.1 only.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Bug: https://bugzilla.samba.org/show_bug.cgi?id=10663
100% smbd cpu loop in ctdb setups
source3/lib/msg_channel.c