* sysdeps/sparc/sparc32/bits/atomic.h
authorUlrich Drepper <drepper@redhat.com>
Sat, 25 Mar 2006 21:03:32 +0000 (21:03 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sat, 25 Mar 2006 21:03:32 +0000 (21:03 +0000)
(__v9_compare_and_exchange_val_32_acq): Add "memory" clobber.
* sysdeps/sparc/sparc32/sparcv9/bits/atomic.h
(__arch_compare_and_exchange_val_32_acq, atomic_exchange_acq):
Likewise.
* sysdeps/sparc/sparc64/bits/atomic.h
(__arch_compare_and_exchange_val_32_acq,
__arch_compare_and_exchange_val_64_acq, atomic_exchange_acq): Likewise.

2006-03-24  Jakub Jelinek  <jakub@redhat.com>

* nis/nss_nisplus/nisplus-proto.c (_nss_create_tablename): Check the
return value of malloc rather than the static var again.
* nis/nss_nisplus/nisplus-grp.c (_nss_create_tablename): Likewise.
* nis/nss_nisplus/nisplus-network.c (_nss_create_tablename): Likewise.
* nis/nss_nisplus/nisplus-ethers.c (_nss_create_tablename): Likewise.
* nis/nss_nisplus/nisplus-rpc.c (_nss_create_tablename): Likewise.
* nis/nss_nisplus/nisplus-service.c (_nss_create_tablename): Likewise.
* nis/nss_nisplus/nisplus-hosts.c (_nss_create_tablename): Likewise.
* nis/nss_nisplus/nisplus-alias.c (_nss_create_tablename): Likewise.
* nis/nss_nisplus/nisplus-pwd.c (_nss_pwd_create_tablename): Likewise.

13 files changed:
ChangeLog
nis/nss_nisplus/nisplus-alias.c
nis/nss_nisplus/nisplus-ethers.c
nis/nss_nisplus/nisplus-grp.c
nis/nss_nisplus/nisplus-hosts.c
nis/nss_nisplus/nisplus-network.c
nis/nss_nisplus/nisplus-proto.c
nis/nss_nisplus/nisplus-pwd.c
nis/nss_nisplus/nisplus-rpc.c
nis/nss_nisplus/nisplus-service.c
sysdeps/sparc/sparc32/bits/atomic.h
sysdeps/sparc/sparc32/sparcv9/bits/atomic.h
sysdeps/sparc/sparc64/bits/atomic.h

index 632ae73..370d3c6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,27 @@
+2006-03-24  David S. Miller  <davem@sunset.davemloft.net>
+
+       * sysdeps/sparc/sparc32/bits/atomic.h
+       (__v9_compare_and_exchange_val_32_acq): Add "memory" clobber.
+       * sysdeps/sparc/sparc32/sparcv9/bits/atomic.h
+       (__arch_compare_and_exchange_val_32_acq, atomic_exchange_acq):
+       Likewise.
+       * sysdeps/sparc/sparc64/bits/atomic.h
+       (__arch_compare_and_exchange_val_32_acq,
+       __arch_compare_and_exchange_val_64_acq, atomic_exchange_acq): Likewise.
+
+2006-03-24  Jakub Jelinek  <jakub@redhat.com>
+
+       * nis/nss_nisplus/nisplus-proto.c (_nss_create_tablename): Check the
+       return value of malloc rather than the static var again.
+       * nis/nss_nisplus/nisplus-grp.c (_nss_create_tablename): Likewise.
+       * nis/nss_nisplus/nisplus-network.c (_nss_create_tablename): Likewise.
+       * nis/nss_nisplus/nisplus-ethers.c (_nss_create_tablename): Likewise.
+       * nis/nss_nisplus/nisplus-rpc.c (_nss_create_tablename): Likewise.
+       * nis/nss_nisplus/nisplus-service.c (_nss_create_tablename): Likewise.
+       * nis/nss_nisplus/nisplus-hosts.c (_nss_create_tablename): Likewise.
+       * nis/nss_nisplus/nisplus-alias.c (_nss_create_tablename): Likewise.
+       * nis/nss_nisplus/nisplus-pwd.c (_nss_pwd_create_tablename): Likewise.
+
 2006-03-25  Ulrich Drepper  <drepper@redhat.com>
 
        * sysdeps/unix/sysv/linux/sparc/bits/poll.h: Add POLLMSG,
index 6aa93ab..d7926e1 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (C) 1997,1998,2001,2002,2003,2005 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2001, 2002, 2003, 2005, 2006
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
 
@@ -51,7 +52,7 @@ _nss_create_tablename (int *errnop)
       static const char prefix[] = "mail_aliases.org_dir.";
 
       char *p = malloc (sizeof (prefix) + local_dir_len);
-      if (tablename_val == NULL)
+      if (p == NULL)
        {
          *errnop = errno;
          return NSS_STATUS_TRYAGAIN;
index fcc550e..ca0a9e2 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997,1998,2000-2003,2005 Free Software Foundation, Inc.
+/* Copyright (C) 1997,1998,2000-2003,2005,2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@suse.de>, 1997.
 
@@ -94,7 +94,7 @@ _nss_create_tablename (int *errnop)
       static const char prefix[] = "ethers.org_dir.";
 
       char *p = malloc (sizeof (prefix) + local_dir_len);
-      if (tablename_val == NULL)
+      if (p == NULL)
        {
          *errnop = errno;
          return NSS_STATUS_TRYAGAIN;
index 423f7e7..624b206 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (C) 1997, 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 2001, 2002, 2003, 2005, 2006
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
 
@@ -47,7 +48,7 @@ _nss_create_tablename (int *errnop)
       static const char prefix[] = "group.org_dir.";
 
       char *p = malloc (sizeof (prefix) + local_dir_len);
-      if (tablename_val == NULL)
+      if (p == NULL)
        {
          *errnop = errno;
          return NSS_STATUS_TRYAGAIN;
index 81f8a98..bf002d6 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2002, 2003, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2002, 2003, 2005, 2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@suse.de>, 1997.
 
@@ -186,7 +186,7 @@ _nss_create_tablename (int *errnop)
       static const char prefix[] = "hosts.org_dir.";
 
       char *p = malloc (sizeof (prefix) + local_dir_len);
-      if (tablename_val == NULL)
+      if (p == NULL)
        {
          *errnop = errno;
          return NSS_STATUS_TRYAGAIN;
index dc6b99e..960c055 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997,1998,2000-2003,2005 Free Software Foundation, Inc.
+/* Copyright (C) 1997,1998,2000-2003,2005,2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
 
@@ -148,7 +148,7 @@ _nss_create_tablename (int *errnop)
       static const char prefix[] = "networks.org_dir.";
 
       char *p = malloc (sizeof (prefix) + local_dir_len);
-      if (tablename_val == NULL)
+      if (p == NULL)
        {
          *errnop = errno;
          return NSS_STATUS_TRYAGAIN;
index 585a484..a3370aa 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (C) 1997,1998,2001,2002,2003,2005 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2001, 2002, 2003, 2005, 2006
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
 
@@ -147,7 +148,7 @@ _nss_create_tablename (int *errnop)
       static const char prefix[] = "protocols.org_dir.";
 
       char *p = malloc (sizeof (prefix) + local_dir_len);
-      if (tablename_val == NULL)
+      if (p == NULL)
        {
          *errnop = errno;
          return NSS_STATUS_TRYAGAIN;
index 97679dd..6c222ed 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (C) 1997,1999,2001,2002,2003,2005 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1999, 2001, 2002, 2003, 2005, 2006
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
 
@@ -44,7 +45,7 @@ _nss_pwd_create_tablename (int *errnop)
       static const char prefix[] = "passwd.org_dir.";
 
       char *p = malloc (sizeof (prefix) + local_dir_len);
-      if (pwd_tablename_val == NULL)
+      if (p == NULL)
        {
          *errnop = errno;
          return NSS_STATUS_TRYAGAIN;
index 98baa5f..f6ab3fb 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (C) 1997,1998,2001,2002,2003,2005 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2001, 2002, 2003, 2005, 2006
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
 
@@ -144,7 +145,7 @@ _nss_create_tablename (int *errnop)
       static const char prefix[] = "rpc.org_dir.";
 
       char *p = malloc (sizeof (prefix) + local_dir_len);
-      if (tablename_val == NULL)
+      if (p == NULL)
        {
          *errnop = errno;
          return NSS_STATUS_TRYAGAIN;
index 848e5f4..c47dc09 100644 (file)
@@ -1,4 +1,5 @@
-/* Copyright (C) 1997-1999,2001,2002,2003,2005 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 1999, 2001, 2002, 2003, 2005, 2006
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@suse.de>, 1997.
 
@@ -151,7 +152,7 @@ _nss_create_tablename (int *errnop)
       static const char prefix[] = "services.org_dir.";
 
       char *p = malloc (sizeof (prefix) + local_dir_len);
-      if (tablename_val == NULL)
+      if (p == NULL)
        {
          *errnop = errno;
          return NSS_STATUS_TRYAGAIN;
index 707a4b0..ef553f7 100644 (file)
@@ -122,7 +122,7 @@ volatile unsigned char __sparc32_atomic_locks[64]
   __asm __volatile (".word 0xcde05005"                                       \
                    : "+r" (__acev_tmp), "=m" (*__acev_mem)                   \
                    : "r" (__acev_oldval), "m" (*__acev_mem),                 \
-                     "r" (__acev_mem));                                      \
+                     "r" (__acev_mem) : "memory");                           \
   __acev_tmp; })
 #endif
 
index 36959a9..7b9d61d 100644 (file)
@@ -59,7 +59,7 @@ typedef uintmax_t uatomic_max_t;
   __asm __volatile ("cas [%4], %2, %0"                                       \
                    : "=r" (__acev_tmp), "=m" (*__acev_mem)                   \
                    : "r" (oldval), "m" (*__acev_mem), "r" (__acev_mem),      \
-                     "0" (newval));                                          \
+                     "0" (newval) : "memory");                               \
   __acev_tmp; })
 
 /* This can be implemented if needed.  */
@@ -74,7 +74,7 @@ typedef uintmax_t uatomic_max_t;
      if (sizeof (*(mem)) == 4)                                               \
        __asm ("swap %0, %1"                                                  \
              : "=m" (*__memp), "=r" (__oldval)                               \
-             : "m" (*__memp), "1" (__value));                                \
+             : "m" (*__memp), "1" (__value) : "memory");                     \
      else                                                                    \
        abort ();                                                             \
      __oldval; })
index 2fb3778..d0a64af 100644 (file)
@@ -59,7 +59,7 @@ typedef uintmax_t uatomic_max_t;
   __asm __volatile ("cas [%4], %2, %0"                                       \
                    : "=r" (__acev_tmp), "=m" (*__acev_mem)                   \
                    : "r" (oldval), "m" (*__acev_mem), "r" (__acev_mem),      \
-                     "0" (newval));                                          \
+                     "0" (newval) : "memory");                               \
   __acev_tmp; })
 
 #define __arch_compare_and_exchange_val_64_acq(mem, newval, oldval) \
@@ -69,7 +69,7 @@ typedef uintmax_t uatomic_max_t;
   __asm __volatile ("casx [%4], %2, %0"                                              \
                    : "=r" (__acev_tmp), "=m" (*__acev_mem)                   \
                    : "r" ((long) (oldval)), "m" (*__acev_mem),               \
-                     "r" (__acev_mem), "0" ((long) (newval)));               \
+                     "r" (__acev_mem), "0" ((long) (newval)) : "memory");    \
   __acev_tmp; })
 
 #define atomic_exchange_acq(mem, newvalue) \
@@ -80,7 +80,7 @@ typedef uintmax_t uatomic_max_t;
      if (sizeof (*(mem)) == 4)                                               \
        __asm ("swap %0, %1"                                                  \
              : "=m" (*__memp), "=r" (__oldval)                               \
-             : "m" (*__memp), "1" (__value));                                \
+             : "m" (*__memp), "1" (__value) : "memory");                     \
      else                                                                    \
        {                                                                     \
         __val = *__memp;                                                     \