[SCM] Samba Shared Repository - branch master updated
Andrew Tridgell
tridge at samba.org
Thu Apr 1 20:17:06 MDT 2010
The branch, master has been updated
via 5ccd30e... talloc: change talloc minor version to 2.0.2
via ff2b7d4... talloc: limit the depth that talloc will go for talloc_is_parent()
from bf90969... Move initialize_async_io_handler() inside of smbd/aio.c.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 5ccd30e9ac5cb93a79c076c22709e271d34d9483
Author: Andrew Tridgell <tridge at samba.org>
Date: Fri Apr 2 12:02:55 2010 +1100
talloc: change talloc minor version to 2.0.2
this has the talloc_is_parent() bugfix
commit ff2b7d42e685d015f281fc525c745242e84ba54d
Author: Andrew Tridgell <tridge at samba.org>
Date: Fri Apr 2 11:59:49 2010 +1100
talloc: limit the depth that talloc will go for talloc_is_parent()
We have a bug in the dcerpc registry code that can cause a talloc loop
that chews unlimited CPU because of talloc_is_parent() during a
talloc_free()
-----------------------------------------------------------------------
Summary of changes:
lib/talloc/configure.ac | 2 +-
lib/talloc/talloc.c | 13 +++++++++++--
source4/lib/ldb/external/libtalloc.m4 | 2 +-
3 files changed, 13 insertions(+), 4 deletions(-)
Changeset truncated at 500 lines:
diff --git a/lib/talloc/configure.ac b/lib/talloc/configure.ac
index c1b1d2e..d160f08 100644
--- a/lib/talloc/configure.ac
+++ b/lib/talloc/configure.ac
@@ -1,5 +1,5 @@
AC_PREREQ(2.50)
-AC_INIT(talloc, 2.0.1)
+AC_INIT(talloc, 2.0.2)
AC_CONFIG_SRCDIR([talloc.c])
AC_SUBST(datarootdir)
AC_CONFIG_HEADER(config.h)
diff --git a/lib/talloc/talloc.c b/lib/talloc/talloc.c
index f7b1ac3..51a0023 100644
--- a/lib/talloc/talloc.c
+++ b/lib/talloc/talloc.c
@@ -1974,7 +1974,7 @@ void talloc_show_parents(const void *context, FILE *file)
/*
return 1 if ptr is a parent of context
*/
-int talloc_is_parent(const void *context, const void *ptr)
+static int _talloc_is_parent(const void *context, const void *ptr, int depth)
{
struct talloc_chunk *tc;
@@ -1983,12 +1983,21 @@ int talloc_is_parent(const void *context, const void *ptr)
}
tc = talloc_chunk_from_ptr(context);
- while (tc) {
+ while (tc && depth > 0) {
if (TC_PTR_FROM_CHUNK(tc) == ptr) return 1;
while (tc && tc->prev) tc = tc->prev;
if (tc) {
tc = tc->parent;
+ depth--;
}
}
return 0;
}
+
+/*
+ return 1 if ptr is a parent of context
+*/
+int talloc_is_parent(const void *context, const void *ptr)
+{
+ return _talloc_is_parent(context, ptr, 10000);
+}
diff --git a/source4/lib/ldb/external/libtalloc.m4 b/source4/lib/ldb/external/libtalloc.m4
index dfccaf4..d41d3d1 100644
--- a/source4/lib/ldb/external/libtalloc.m4
+++ b/source4/lib/ldb/external/libtalloc.m4
@@ -2,7 +2,7 @@ AC_SUBST(TALLOC_OBJ)
AC_SUBST(TALLOC_CFLAGS)
AC_SUBST(TALLOC_LIBS)
-PKG_CHECK_MODULES(TALLOC, talloc >= 2.0.1,
+PKG_CHECK_MODULES(TALLOC, talloc >= 2.0.2,
[ ],
[ AC_CHECK_HEADER(talloc.h,
[ AC_CHECK_LIB(talloc, talloc_init, [TALLOC_LIBS="-ltalloc"])])])
--
Samba Shared Repository
More information about the samba-cvs
mailing list