[BZ #2114]
authorUlrich Drepper <drepper@redhat.com>
Fri, 6 Jan 2006 19:15:13 +0000 (19:15 +0000)
committerUlrich Drepper <drepper@redhat.com>
Fri, 6 Jan 2006 19:15:13 +0000 (19:15 +0000)
* ncsd/aicache.c: Don't use sendfile for records on the stack.
* nscd/grpcache.c: Likewise.
* nscd/hstcache.c: Likewise.
* nscd/initgrcache.c: Likewise.
* nscd/pwdcache.c: Likewise.
Patch by dmueller@suse.com.

ChangeLog
nscd/aicache.c
nscd/grpcache.c
nscd/hstcache.c
nscd/initgrcache.c
nscd/pwdcache.c

index ab9c7fe..6d6ca4b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2006-01-06  Ulrich Drepper  <drepper@redhat.com>
 
+       [BZ #2114]
+       * ncsd/aicache.c: Don't use sendfile for records on the stack.
+       * nscd/grpcache.c: Likewise.
+       * nscd/hstcache.c: Likewise.
+       * nscd/initgrcache.c: Likewise.
+       * nscd/pwdcache.c: Likewise.
+       Patch by dmueller@suse.com.
+
        * sysdeps/unix/sysv/linux/alpha/bits/mman.h: Define MADV_REMOVE.
        * sysdeps/unix/sysv/linux/i386/bits/mman.h: Likewise.
        * sysdeps/unix/sysv/linux/ia64/bits/mman.h: Likewise.
index 6f24daa..4640b4d 100644 (file)
@@ -1,5 +1,5 @@
 /* Cache handling for host lookup.
-   Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2004.
 
@@ -368,7 +368,7 @@ addhstaiX (struct database_dyn *db, int fd, request_header *req,
                  assert (fd != -1);
 
 #ifdef HAVE_SENDFILE
-                 if (__builtin_expect (db->mmap_used, 1))
+                 if (__builtin_expect (db->mmap_used, 1) && !alloca_used)
                    {
                      assert (db->wr_fd != -1);
                      assert ((char *) &dataset->resp > (char *) db->data);
index d38a928..4bc9977 100644 (file)
@@ -1,5 +1,5 @@
 /* Cache handling for group lookup.
-   Copyright (C) 1998-2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+   Copyright (C) 1998-2005, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
 
@@ -296,7 +296,7 @@ cache_addgr (struct database_dyn *db, int fd, request_header *req,
          assert (fd != -1);
 
 #ifdef HAVE_SENDFILE
-         if (__builtin_expect (db->mmap_used, 1))
+         if (__builtin_expect (db->mmap_used, 1) && !alloca_used)
            {
              assert (db->wr_fd != -1);
              assert ((char *) &dataset->resp > (char *) db->data);
index a7d981a..e27ece5 100644 (file)
@@ -1,5 +1,5 @@
 /* Cache handling for host lookup.
-   Copyright (C) 1998-2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+   Copyright (C) 1998-2005, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
 
@@ -330,7 +330,7 @@ cache_addhst (struct database_dyn *db, int fd, request_header *req,
          assert (fd != -1);
 
 #ifdef HAVE_SENDFILE
-         if (__builtin_expect (db->mmap_used, 1))
+         if (__builtin_expect (db->mmap_used, 1) && !alloca_used)
            {
              assert (db->wr_fd != -1);
              assert ((char *) &dataset->resp > (char *) db->data);
index 423dbbe..f2ff03a 100644 (file)
@@ -1,5 +1,5 @@
 /* Cache handling for host lookup.
-   Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+   Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2004.
 
@@ -347,7 +347,7 @@ addinitgroupsX (struct database_dyn *db, int fd, request_header *req,
          assert (fd != -1);
 
 #ifdef HAVE_SENDFILE
-         if (__builtin_expect (db->mmap_used, 1))
+         if (__builtin_expect (db->mmap_used, 1) && !alloca_used)
            {
              assert (db->wr_fd != -1);
              assert ((char *) &dataset->resp > (char *) db->data);
index 529c707..2daff79 100644 (file)
@@ -1,5 +1,5 @@
 /* Cache handling for passwd lookup.
-   Copyright (C) 1998-2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+   Copyright (C) 1998-2005, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
 
@@ -291,7 +291,7 @@ cache_addpw (struct database_dyn *db, int fd, request_header *req,
          assert (fd != -1);
 
 #ifdef HAVE_SENDFILE
-         if (__builtin_expect (db->mmap_used, 1))
+         if (__builtin_expect (db->mmap_used, 1) && !alloca_used)
            {
              assert (db->wr_fd != -1);
              assert ((char *) &dataset->resp > (char *) db->data);