From: Theodore Ts'o Date: Mon, 25 Jul 2005 16:36:43 +0000 (-0500) Subject: Fix false positives from valgrind: prctl(PR_GET_DUMPABLE) X-Git-Tag: E2FSPROGS-1.39-WIP-1210~43 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=583d1f83284ddfe126d97e6db0020739a1609b5a;p=tools%2Fe2fsprogs.git Fix false positives from valgrind: prctl(PR_GET_DUMPABLE) Pass in zero to the unusued arguments of prctl(PR_GET_DUMPABLE) to avoid false positives from valgrind. Signed-off-by: "Theodore Ts'o" --- diff --git a/lib/blkid/ChangeLog b/lib/blkid/ChangeLog index 767f11e..1bb8cd3 100644 --- a/lib/blkid/ChangeLog +++ b/lib/blkid/ChangeLog @@ -1,3 +1,9 @@ +2005-07-25 Theodore Ts'o + + * 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 * getsize.c (blkid_get_dev_size): Use fstat/fstat64 to get size of diff --git a/lib/blkid/cache.c b/lib/blkid/cache.c index b43be60..b47b488 100644 --- a/lib/blkid/cache.c +++ b/lib/blkid/cache.c @@ -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 diff --git a/lib/ext2fs/ChangeLog b/lib/ext2fs/ChangeLog index b586a6b..8202608 100644 --- a/lib/ext2fs/ChangeLog +++ b/lib/ext2fs/ChangeLog @@ -1,11 +1,18 @@ +2005-07-25 Theodore Ts'o + + * 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 * 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 diff --git a/lib/ext2fs/test_io.c b/lib/ext2fs/test_io.c index 2d42617..03d63ce 100644 --- a/lib/ext2fs/test_io.c +++ b/lib/ext2fs/test_io.c @@ -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 diff --git a/lib/ss/ChangeLog b/lib/ss/ChangeLog index 389b35f..13447b0 100644 --- a/lib/ss/ChangeLog +++ b/lib/ss/ChangeLog @@ -1,3 +1,9 @@ +2005-07-25 Theodore Ts'o + + * 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 * Release of E2fsprogs 1.38 diff --git a/lib/ss/pager.c b/lib/ss/pager.c index e532778..a7a2a09 100644 --- a/lib/ss/pager.c +++ b/lib/ss/pager.c @@ -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