[SCM] Samba Shared Repository - branch v3-4-test updated

Karolin Seeger kseeger at samba.org
Mon Oct 12 02:50:19 MDT 2009


The branch, v3-4-test has been updated
       via  5629065... Fix bug 6796 - Deleting an event context on shutdown can cause smbd to crash.
      from  951991d... Fix bug 6774 - smbd crashes if "aio write behind" is set.

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


- Log -----------------------------------------------------------------
commit 56290654c0c2056c31e0b348ba0d01e5c28ba89b
Author: Jeremy Allison <jra at samba.org>
Date:   Fri Oct 9 12:50:26 2009 -0700

    Fix bug 6796 - Deleting an event context on shutdown can cause smbd to crash.
    
    Sync's tevent signal code with 3.5.x tree.
    Protects against ev pointer being NULL.
    
    Jeremy

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

Summary of changes:
 lib/tevent/tevent_signal.c |   10 ++--------
 1 files changed, 2 insertions(+), 8 deletions(-)


Changeset truncated at 500 lines:

diff --git a/lib/tevent/tevent_signal.c b/lib/tevent/tevent_signal.c
index 0ca2a27..ab170a6 100644
--- a/lib/tevent/tevent_signal.c
+++ b/lib/tevent/tevent_signal.c
@@ -90,18 +90,12 @@ static void tevent_common_signal_handler(int signum)
 	SIG_INCREMENT(sig_state->signal_count[signum]);
 	SIG_INCREMENT(sig_state->got_signal);
 
-	if (sig_state->sig_handlers[signum] != NULL) {
-		ev = sig_state->sig_handlers[signum]->se->event_ctx;
-		/* doesn't matter if this pipe overflows */
-		res = write(ev->pipe_fds[1], &c, 1);
-	}
-
 	/* Write to each unique event context. */
 	for (sl = sig_state->sig_handlers[signum]; sl; sl = sl->next) {
-		if (sl->se->event_ctx != ev) {
+		if (sl->se->event_ctx && sl->se->event_ctx != ev) {
+			ev = sl->se->event_ctx;
 			/* doesn't matter if this pipe overflows */
 			res = write(ev->pipe_fds[1], &c, 1);
-			ev = sl->se->event_ctx;
 		}
 	}
 


-- 
Samba Shared Repository


More information about the samba-cvs mailing list