[SCM] Samba Shared Repository - branch v3-2-stable updated - release-3-2-0pre3-65-g6971da9

Karolin Seeger kseeger at samba.org
Wed May 7 15:03:31 GMT 2008


The branch, v3-2-stable has been updated
       via  6971da969db6fd5600a9c983b72901ae5a390d0d (commit)
      from  de66f050e31e069dfe76644eacfdfd56cc5d179d (commit)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-stable


- Log -----------------------------------------------------------------
commit 6971da969db6fd5600a9c983b72901ae5a390d0d
Author: Gerald W. Carter <jerry at samba.org>
Date:   Wed Apr 30 10:09:43 2008 -0500

    Winbind: Prevent cycle in children list when reaping dead child processes.
    
    Thanks to Glenn Curtis and Kyle Stemen @ Likewise.  Their explanation is:
    
        In winbindd_dual.c, there is a list of children processes that
        is maintained using macros DTLIST_ADD and DTLIST_REMOVE. In the
        case when a scheduled_async_request fails, the particular child
        was located in the list, and its attributes were cleared out
        and it was reused for a subsequent async request. The bug was that
        the new request would queue the same node into the doubly-linked
        list and would result in list->next pointing to the same node as
        list itself. This would set up an infinite loop in the processing of
        the for loop when the list of children was referenced.
    
        Solution was to fully remove the child node from the list, such that
        it could be inserted without risk of being inserted twice.
    
    Note that the child is re-added to the list in fork_domain_child() again.
    (cherry picked from commit b379b5b5d8a6daccc69aaf2be6d9a6e276e7dd78)
    (cherry picked from commit 5a270bc99f52483f168d662d843672d05be74473)

-----------------------------------------------------------------------

Summary of changes:
 source/winbindd/winbindd_dual.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source/winbindd/winbindd_dual.c b/source/winbindd/winbindd_dual.c
index 14ba38c..f71eec5 100644
--- a/source/winbindd/winbindd_dual.c
+++ b/source/winbindd/winbindd_dual.c
@@ -478,6 +478,10 @@ void winbind_child_died(pid_t pid)
 		return;
 	}
 
+	/* This will be re-added in fork_domain_child() */
+
+	DLIST_REMOVE(children, child);
+	
 	remove_fd_event(&child->event);
 	close(child->event.fd);
 	child->event.fd = 0;


-- 
Samba Shared Repository


More information about the samba-cvs mailing list