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: <1305027117-936-1-git-send-email-xiaoqiangnk@gmail.com>
Date:	Tue, 10 May 2011 19:31:57 +0800
From:	Yongqiang Yang <xiaoqiangnk@...il.com>
To:	linux-ext4@...r.kernel.org
Cc:	tytso@....edu, Yongqiang Yang <xiaoqiangnk@...il.com>
Subject: [PATCH] ext4:Fix a bug in 6d9c85eb.

In case blocksize < pagesize, ext4_ext_fiemap_cb need to ignore
blocks which are not in request range.

BUG description:
xfstests 225 ended in a endless loop without this patch
when blocksize < pagesize.

Reported-by: Amir Goldstein <amir73il@...rs.sf.net>
Signed-off-by: Yongqiang Yang <xiaoqiangnk@...il.com>
---
 fs/ext4/extents.c |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index e363f21..ec37109 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -3718,9 +3718,14 @@ out:
 
 			bh = head;
 			do {
+				if (end < newex->ec_block)
+					/* The buffer is not in
+					 * the request range.
+					 */
+					continue;
 				if (buffer_mapped(bh)) {
 					/* get the 1st mapped buffer. */
-					if (end > newex->ec_block +
+					if (end >= newex->ec_block +
 						newex->ec_len)
 						/* The buffer is out of
 						 * the request range.
-- 
1.7.5.1

--
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