Whamcloud - gitweb
Fix false positives from valgrind: prctl(PR_GET_DUMPABLE)
authorTheodore Ts'o <tytso@mit.edu>
Mon, 25 Jul 2005 16:36:43 +0000 (11:36 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 25 Jul 2005 16:36:43 +0000 (11:36 -0500)
Pass in zero to the unusued arguments of prctl(PR_GET_DUMPABLE) to
avoid false positives from valgrind.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
lib/blkid/ChangeLog
lib/blkid/cache.c
lib/ext2fs/ChangeLog
lib/ext2fs/test_io.c
lib/ss/ChangeLog
lib/ss/pager.c

index 767f11e..1bb8cd3 100644 (file)
@@ -1,3 +1,9 @@
+2005-07-25  Theodore Ts'o  <tytso@mit.edu>
+
+       * cache.c (safe_getenv): Pass in zero to the unusued arguments of
+               prctl(PR_GET_DUMPABLE) to avoid false positives from
+               valgrind.
+
 2005-07-09  Andreas Dilger <adilger@clusterfs.com>
 
        * getsize.c (blkid_get_dev_size): Use fstat/fstat64 to get size of
index b43be60..b47b488 100644 (file)
@@ -36,11 +36,11 @@ static char *safe_getenv(const char *arg)
        if ((getuid() != geteuid()) || (getgid() != getegid()))
                return NULL;
 #if HAVE_PRCTL
-       if (prctl(PR_GET_DUMPABLE) == 0)
+       if (prctl(PR_GET_DUMPABLE, 0, 0, 0, 0) == 0)
                return NULL;
 #else
 #if (defined(linux) && defined(SYS_prctl))
-       if (syscall(SYS_prctl, PR_GET_DUMPABLE) == 0)
+       if (syscall(SYS_prctl, PR_GET_DUMPABLE, 0, 0, 0, 0) == 0)
                return NULL;
 #endif
 #endif
index b586a6b..8202608 100644 (file)
@@ -1,11 +1,18 @@
+2005-07-25  Theodore Ts'o  <tytso@mit.edu>
+
+       * test_io.c (safe_getenv): Pass in zero to the unusued arguments
+               of prctl(PR_GET_DUMPABLE) to avoid false positives from
+               valgrind.
+
 2005-07-19  Theodore Ts'o  <tytso@mit.edu>
 
        * mkjournal.c (ext2fs_add_journal_inode): Check for the case where
                the filesystem is apparently not mounted, but the device
-               is still busy.  This can happy when the luser doesn't
-               bother to mount /proc and has a bogus /etc/mtab.  Add a
-               safety check to save him from his own stupidity, at least
-               on 2.6 kernels.  (Addresses Debian Bug #319002)
+               is still busy.  This can happen when the luser doesn't
+               bother to mount /proc and has a bogus /etc/mtab, but still
+               wants to mount the filesystem before using tune2fs(?!?).
+               Add a safety check to save him from his own stupidity, at
+               least on 2.6 kernels.  (Addresses Debian Bug #319002)
 
 2005-07-09  Andreas Dilger <adilger@clusterfs.com>
 
index 2d42617..03d63ce 100644 (file)
@@ -145,11 +145,11 @@ static char *safe_getenv(const char *arg)
        if ((getuid() != geteuid()) || (getgid() != getegid()))
                return NULL;
 #if HAVE_PRCTL
-       if (prctl(PR_GET_DUMPABLE) == 0)
+       if (prctl(PR_GET_DUMPABLE, 0, 0, 0, 0) == 0)
                return NULL;
 #else
 #if (defined(linux) && defined(SYS_prctl))
-       if (syscall(SYS_prctl, PR_GET_DUMPABLE) == 0)
+       if (syscall(SYS_prctl, PR_GET_DUMPABLE, 0, 0, 0, 0) == 0)
                return NULL;
 #endif
 #endif
index 389b35f..13447b0 100644 (file)
@@ -1,3 +1,9 @@
+2005-07-25  Theodore Ts'o  <tytso@mit.edu>
+
+       * pager.c (ss_safe_getenv): Pass in zero to the unusued arguments
+               of prctl(PR_GET_DUMPABLE) to avoid false positives from
+               valgrind.
+
 2006-06-30  Theodore Ts'o  <tytso@mit.edu>
 
        * Release of E2fsprogs 1.38
index e532778..a7a2a09 100644 (file)
@@ -46,11 +46,11 @@ char *ss_safe_getenv(const char *arg)
        if ((getuid() != geteuid()) || (getgid() != getegid()))
                return NULL;
 #if HAVE_PRCTL
-       if (prctl(PR_GET_DUMPABLE) == 0)
+       if (prctl(PR_GET_DUMPABLE, 0, 0, 0, 0) == 0)
                return NULL;
 #else
 #if (defined(linux) && defined(SYS_prctl))
-       if (syscall(SYS_prctl, PR_GET_DUMPABLE) == 0)
+       if (syscall(SYS_prctl, PR_GET_DUMPABLE, 0, 0, 0, 0) == 0)
                return NULL;
 #endif
 #endif