This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.19-17-gd674667


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  d674667cbaa84ff4cf82cfedacad0665ae6cb440 (commit)
       via  6fc8123f48680ddb6b40689a09c65488ee5bbd4b (commit)
      from  6349768c8b052e1ebdc1b9dcd2333decde6d80ff (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://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=d674667cbaa84ff4cf82cfedacad0665ae6cb440

commit d674667cbaa84ff4cf82cfedacad0665ae6cb440
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Thu Jan 23 01:16:14 2014 -0500

    shm_open: sync with logic in sem_open
    
    Signed-off-by: Mike Frysinger <vapier@gentoo.org>

diff --git a/ChangeLog b/ChangeLog
index f59152e..34b2edf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2014-02-08  Mike Frysinger  <vapier@gentoo.org>
 
+	* sysdeps/unix/sysv/linux/shm_open.c (where_is_shmfs): Compare
+	f.f_type to RAMFS_MAGIC too.  Compare mp->mnt_type to shm too.
+
+2014-02-08  Mike Frysinger  <vapier@gentoo.org>
+
 	* manual/setjmp.texi: Fix typos/grammar errors.
 
 2014-02-08  Mike Frysinger  <vapier@gentoo.org>
diff --git a/sysdeps/unix/sysv/linux/shm_open.c b/sysdeps/unix/sysv/linux/shm_open.c
index 5f23515..fef8fd5 100644
--- a/sysdeps/unix/sysv/linux/shm_open.c
+++ b/sysdeps/unix/sysv/linux/shm_open.c
@@ -62,7 +62,8 @@ where_is_shmfs (void)
 
   /* The canonical place is /dev/shm.  This is at least what the
      documentation tells everybody to do.  */
-  if (__statfs (defaultdir, &f) == 0 && f.f_type == SHMFS_SUPER_MAGIC)
+  if (__statfs (defaultdir, &f) == 0 && (f.f_type == SHMFS_SUPER_MAGIC
+					 || f.f_type == RAMFS_MAGIC))
     {
       /* It is in the normal place.  */
       mountpoint.dir = (char *) defaultdir;
@@ -86,7 +87,8 @@ where_is_shmfs (void)
   while ((mp = __getmntent_r (fp, &resmem, buf, sizeof buf)) != NULL)
     /* The original name is "shm" but this got changed in early Linux
        2.4.x to "tmpfs".  */
-    if (strcmp (mp->mnt_type, "tmpfs") == 0)
+    if (strcmp (mp->mnt_type, "tmpfs") == 0
+	|| strcmp (mp->mnt_type, "shm") == 0)
       {
 	/* Found it.  There might be more than one place where the
            filesystem is mounted but one is enough for us.  */
@@ -95,7 +97,8 @@ where_is_shmfs (void)
 	/* First make sure this really is the correct entry.  At least
 	   some versions of the kernel give wrong information because
 	   of the implicit mount of the shmfs for SysV IPC.  */
-	if (__statfs (mp->mnt_dir, &f) != 0 || f.f_type != SHMFS_SUPER_MAGIC)
+	if (__statfs (mp->mnt_dir, &f) != 0 || (f.f_type != SHMFS_SUPER_MAGIC
+						&& f.f_type != RAMFS_MAGIC))
 	  continue;
 
 	namelen = strlen (mp->mnt_dir);

http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=6fc8123f48680ddb6b40689a09c65488ee5bbd4b

commit 6fc8123f48680ddb6b40689a09c65488ee5bbd4b
Author: Mike Frysinger <vapier@gentoo.org>
Date:   Thu Jan 23 01:15:14 2014 -0500

    sem_open: allow RAMFS_MAGIC for mount points
    
    A ramfs mount supports the same requirements as a tmpfs, so accept that
    as a magic type too.
    
    Signed-off-by: Mike Frysinger <vapier@gentoo.org>

diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index a4d3f45..474a473 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,7 @@
+2014-02-08  Mike Frysinger  <vapier@gentoo.org>
+
+	* sem_open.c (__where_is_shmfs): Compare f.f_type to RAMFS_MAGIC too.
+
 2014-02-05  Carlos O'Donell  <carlos@redhat.com>
 
 	* sysdeps/unix/sysv/linux/tst-setgetname.c (do_test): Skip the
diff --git a/nptl/sem_open.c b/nptl/sem_open.c
index 529f636..b57e6b7 100644
--- a/nptl/sem_open.c
+++ b/nptl/sem_open.c
@@ -61,7 +61,8 @@ __where_is_shmfs (void)
 
   /* The canonical place is /dev/shm.  This is at least what the
      documentation tells everybody to do.  */
-  if (__statfs (defaultmount, &f) == 0 && f.f_type == SHMFS_SUPER_MAGIC)
+  if (__statfs (defaultmount, &f) == 0 && (f.f_type == SHMFS_SUPER_MAGIC
+					   || f.f_type == RAMFS_MAGIC))
     {
       /* It is in the normal place.  */
       mountpoint.dir = (char *) defaultdir;
@@ -95,7 +96,8 @@ __where_is_shmfs (void)
 	/* First make sure this really is the correct entry.  At least
 	   some versions of the kernel give wrong information because
 	   of the implicit mount of the shmfs for SysV IPC.  */
-	if (__statfs (mp->mnt_dir, &f) != 0 || f.f_type != SHMFS_SUPER_MAGIC)
+	if (__statfs (mp->mnt_dir, &f) != 0 || (f.f_type != SHMFS_SUPER_MAGIC
+						&& f.f_type != RAMFS_MAGIC))
 	  continue;
 
 	namelen = strlen (mp->mnt_dir);

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                          |    5 +++++
 nptl/ChangeLog                     |    4 ++++
 nptl/sem_open.c                    |    6 ++++--
 sysdeps/unix/sysv/linux/shm_open.c |    9 ++++++---
 4 files changed, 19 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]