This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch, master, updated. glibc-2.14-322-g054c045
- From: drepper at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 6 Oct 2011 07:18:45 -0000
- Subject: GNU C Library master sources branch, master, updated. glibc-2.14-322-g054c045
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via 054c0457fd670ab29024e5e8655f507aecd68e18 (commit)
via 64031225b2595620658640c0b7e01311c8b69a06 (commit)
via 0490345c9fd1f3368f3a515435b0c8a7f6f739fc (commit)
from 3a62d00d408e9ec19479b6c7d39e89021061f9cd (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=054c0457fd670ab29024e5e8655f507aecd68e18
commit 054c0457fd670ab29024e5e8655f507aecd68e18
Author: Ulrich Drepper <drepper@gmail.com>
Date: Thu Oct 6 03:18:20 2011 -0400
Stop crash in OOM handling in NSS
diff --git a/ChangeLog b/ChangeLog
index 52d4f1c..710d6db 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-10-06 Ulrich Drepper <drepper@gmail.com>
+
+ * nss/nsswitch.c (__nss_lookup_function): Fix order of deleting
+ from tree and freeing node.
+
2011-09-25 Jiri Olsa <jolsa@redhat.com>
* nss/nsswitch.c (__nss_database_lookup): Handle
diff --git a/nss/nsswitch.c b/nss/nsswitch.c
index ac73984..924cc84 100644
--- a/nss/nsswitch.c
+++ b/nss/nsswitch.c
@@ -407,6 +407,7 @@ __nss_lookup_function (service_user *ni, const char *fct_name)
/* Oops. We can't instantiate this node properly.
Remove it from the tree. */
__tdelete (&fct_name, &ni->known, &known_compare);
+ free (known);
result = NULL;
}
else
@@ -418,11 +419,8 @@ __nss_lookup_function (service_user *ni, const char *fct_name)
#if !defined DO_STATIC_NSS || defined SHARED
/* Load the appropriate library. */
if (nss_load_library (ni) != 0)
- {
- /* This only happens when out of memory. */
- free (known);
- goto remove_from_tree;
- }
+ /* This only happens when out of memory. */
+ goto remove_from_tree;
if (ni->library->lib_handle == (void *) -1l)
/* Library not found => function not found. */
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=64031225b2595620658640c0b7e01311c8b69a06
commit 64031225b2595620658640c0b7e01311c8b69a06
Author: Jiri Olsa <jolsa@redhat.com>
Date: Thu Oct 6 03:14:21 2011 -0400
More fallout from OOM in NSS
diff --git a/ChangeLog b/ChangeLog
index 33eeafb..52d4f1c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-09-25 Jiri Olsa <jolsa@redhat.com>
+
+ * nss/nsswitch.c (__nss_database_lookup): Handle
+ nss_parse_service_list out of memory case.
+
2011-09-15 Jiri Olsa <jolsa@redhat.com>
* nss/nsswitch.c (__nss_lookup_function): Handle __tsearch
diff --git a/nss/nsswitch.c b/nss/nsswitch.c
index 535d93b..ac73984 100644
--- a/nss/nsswitch.c
+++ b/nss/nsswitch.c
@@ -147,7 +147,7 @@ __nss_database_lookup (const char *database, const char *alternate_name,
__libc_lock_unlock (lock);
- return 0;
+ return *ni != NULL ? 0 : -1;
}
libc_hidden_def (__nss_database_lookup)
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=0490345c9fd1f3368f3a515435b0c8a7f6f739fc
commit 0490345c9fd1f3368f3a515435b0c8a7f6f739fc
Author: Jiri Olsa <jolsa@redhat.com>
Date: Thu Oct 6 03:04:10 2011 -0400
Handle OOM in NSS
diff --git a/ChangeLog b/ChangeLog
index 2fdde34..33eeafb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-09-15 Jiri Olsa <jolsa@redhat.com>
+
+ * nss/nsswitch.c (__nss_lookup_function): Handle __tsearch
+ out of memory case.
+
2011-10-04 Andreas Schwab <schwab@redhat.com>
* include/dlfcn.h (__RTLD_NOIFUNC): Define.
diff --git a/nss/nsswitch.c b/nss/nsswitch.c
index 6c15c3a..535d93b 100644
--- a/nss/nsswitch.c
+++ b/nss/nsswitch.c
@@ -384,7 +384,10 @@ __nss_lookup_function (service_user *ni, const char *fct_name)
will be passed to `known_compare' (above). */
found = __tsearch (&fct_name, &ni->known, &known_compare);
- if (*found != &fct_name)
+ if (found == NULL)
+ /* This means out-of-memory. */
+ result = NULL;
+ else if (*found != &fct_name)
{
/* The search found an existing structure in the tree. */
result = ((known_function *) *found)->fct_ptr;
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 15 +++++++++++++++
nss/nsswitch.c | 15 ++++++++-------
2 files changed, 23 insertions(+), 7 deletions(-)
hooks/post-receive
--
GNU C Library master sources