[SCM] Samba Shared Repository - branch v3-2-test updated -
initial-v3-2-unstable-1085-g4e1bf48
Jeremy Allison
jra at samba.org
Fri Jan 4 22:00:32 GMT 2008
The branch, v3-2-test has been updated
via 4e1bf48e7eab927e70fde3408a42c56e06b9b178 (commit)
via b5ee972b0c04b4d119573d95ac458a3b6be30c5c (commit)
from 2e5d01b2146bb9e057b2779d9fe7691ed46d9f45 (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-2-test
- Log -----------------------------------------------------------------
commit 4e1bf48e7eab927e70fde3408a42c56e06b9b178
Merge: b5ee972b0c04b4d119573d95ac458a3b6be30c5c 2e5d01b2146bb9e057b2779d9fe7691ed46d9f45
Author: Jeremy Allison <jra at samba.org>
Date: Fri Jan 4 13:59:52 2008 -0800
Merge branch 'v3-2-test' of ssh://jra@git.samba.org/data/git/samba into v3-2-test
commit b5ee972b0c04b4d119573d95ac458a3b6be30c5c
Author: Jeremy Allison <jra at samba.org>
Date: Fri Jan 4 13:59:26 2008 -0800
Fix interesting bug found with make valgrindtest. When cancelling
a lock due to file closure make sure we null out the fsp pointer
so it isn't dangling. This is an old bug (not related to the new
changes).
Jeremy.
-----------------------------------------------------------------------
Summary of changes:
source/smbd/blocking.c | 24 ++++++++++++++----------
1 files changed, 14 insertions(+), 10 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/smbd/blocking.c b/source/smbd/blocking.c
index c56f635..4196316 100644
--- a/source/smbd/blocking.c
+++ b/source/smbd/blocking.c
@@ -303,19 +303,20 @@ static void generic_blocking_lock_error(blocking_lock_record *blr, NTSTATUS stat
/* Store the last lock error. */
files_struct *fsp = blr->fsp;
- fsp->last_lock_failure.context.smbpid = blr->lock_pid;
- fsp->last_lock_failure.context.tid = fsp->conn->cnum;
- fsp->last_lock_failure.context.pid = procid_self();
- fsp->last_lock_failure.start = blr->offset;
- fsp->last_lock_failure.size = blr->count;
- fsp->last_lock_failure.fnum = fsp->fnum;
- fsp->last_lock_failure.lock_type = READ_LOCK; /* Don't care. */
- fsp->last_lock_failure.lock_flav = blr->lock_flav;
+ if (fsp) {
+ fsp->last_lock_failure.context.smbpid = blr->lock_pid;
+ fsp->last_lock_failure.context.tid = fsp->conn->cnum;
+ fsp->last_lock_failure.context.pid = procid_self();
+ fsp->last_lock_failure.start = blr->offset;
+ fsp->last_lock_failure.size = blr->count;
+ fsp->last_lock_failure.fnum = fsp->fnum;
+ fsp->last_lock_failure.lock_type = READ_LOCK; /* Don't care. */
+ fsp->last_lock_failure.lock_flav = blr->lock_flav;
+ }
}
ERROR_NT(status);
- if (!srv_send_smb(smbd_server_fd(),outbuf,
- IS_CONN_ENCRYPTED(blr->fsp->conn))) {
+ if (!srv_send_smb(smbd_server_fd(),outbuf, blr->encrypted)) {
exit_server_cleanly("generic_blocking_lock_error: srv_send_smb failed.");
}
}
@@ -605,6 +606,9 @@ file %s fnum = %d\n", blr->com_type, fsp->fsp_name, fsp->fnum ));
locktype,
NT_STATUS_RANGE_NOT_LOCKED);
}
+ /* We're closing the file fsp here, so ensure
+ * we don't have a dangling pointer. */
+ blr->fsp = NULL;
}
}
}
--
Samba Shared Repository
More information about the samba-cvs
mailing list