[SCM] Samba Shared Repository - branch v3-6-test updated
Volker Lendecke
vlendec at samba.org
Tue Sep 28 11:33:35 MDT 2010
The branch, v3-6-test has been updated
via 237799d s3: Attempt to fix bug 7518
from e390261 s3: Increase the debuglevel for connection termination msgs
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test
- Log -----------------------------------------------------------------
commit 237799d40f6d0cd535adbecb4d2e15c46ce47e00
Author: Volker Lendecke <vl at samba.org>
Date: Tue Sep 28 18:40:49 2010 +0200
s3: Attempt to fix bug 7518
If select returns -1, we can't rely on the fd sets. The current code might loop
endlessly because when putting an invalid fd (the closed socket?) on the read
set, a select implementation might choose not to touch it but directly return
with EINVAL. Thus run_events will see the socket readable, which leads to a
"return true", and thus a NT_STATUS_RETRY -> same game again.
We should never get into this situation, but to me the logfiles given in bug
7518 do not reveal enough information to understand how this can happen.
-----------------------------------------------------------------------
Summary of changes:
source3/smbd/process.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/smbd/process.c b/source3/smbd/process.c
index 2b8d8b1..3eb957e 100644
--- a/source3/smbd/process.c
+++ b/source3/smbd/process.c
@@ -975,6 +975,12 @@ static NTSTATUS smbd_server_connection_loop_once(struct smbd_server_connection *
errno = sav;
}
+ /* Check if error */
+ if (selrtn == -1) {
+ /* something is wrong. Maybe the socket is dead? */
+ return map_nt_error_from_unix(errno);
+ }
+
if ((conn->smb1.echo_handler.trusted_fd != -1)
&& FD_ISSET(smbd_server_fd(), &r_fds)
&& FD_ISSET(conn->smb1.echo_handler.trusted_fd, &r_fds)) {
@@ -990,12 +996,6 @@ static NTSTATUS smbd_server_connection_loop_once(struct smbd_server_connection *
return NT_STATUS_RETRY;
}
- /* Check if error */
- if (selrtn == -1) {
- /* something is wrong. Maybe the socket is dead? */
- return map_nt_error_from_unix(errno);
- }
-
/* Did we timeout ? */
if (selrtn == 0) {
return NT_STATUS_RETRY;
--
Samba Shared Repository
More information about the samba-cvs
mailing list