lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1330925795-12358-1-git-send-email-vapier@gentoo.org>
Date:	Mon,  5 Mar 2012 00:36:35 -0500
From:	Mike Frysinger <vapier@...too.org>
To:	linux-ext4@...r.kernel.org
Subject: [PATCH] libext2fs: check for fallocate symbol before using it

If we have newer kernel headers which define FALLOC_FL_PUNCH_HOLE, but we
are on an older glibc which lacks fallocate, we end up trying to use the
func anyways.  Check the ifdef that autoconf already set up for us.

Reported-by: Ortwin Glueck <odi@....ch>
Signed-off-by: Mike Frysinger <vapier@...too.org>
---
 lib/ext2fs/unix_io.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/ext2fs/unix_io.c b/lib/ext2fs/unix_io.c
index 9f0613a..da3f8fd 100644
--- a/lib/ext2fs/unix_io.c
+++ b/lib/ext2fs/unix_io.c
@@ -905,7 +905,7 @@ static errcode_t unix_discard(io_channel channel, unsigned long long block,
 		goto unimplemented;
 #endif
 	} else {
-#ifdef FALLOC_FL_PUNCH_HOLE
+#if defined(HAVE_FALLOCATE) && defined(FALLOC_FL_PUNCH_HOLE)
 		/*
 		 * If we are not on block device, try to use punch hole
 		 * to reclaim free space.
-- 
1.7.8.4

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ