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: <4B6BE443.5000307@gmail.com>
Date:	Fri, 05 Feb 2010 10:26:27 +0100
From:	Roel Kluin <roel.kluin@...il.com>
To:	Mark Fasheh <mfasheh@...e.com>,
	Joel Becker <joel.becker@...cle.com>, tao.ma@...cle.com,
	ocfs2-devel@....oracle.com,
	Andrew Morton <akpm@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH] ocfs2: Fix contiguousness check in ocfs2_try_to_merge_extent_map()

The wrong member was compared in the continguousness check.

Acked-by: Tao Ma <tao.ma@...cle.com>
Signed-off-by: Roel Kluin <roel.kluin@...il.com>
---
>>         } else if ((ins->ei_phys + ins->ei_clusters) == emi->ei_phys &&
>>                    (ins->ei_cpos + ins->ei_clusters) == emi->ei_phys &&

>> should that 2nd emi->ei_phys be emi->ei_cpos?
> oh, yes, you are right. Do you want to provide a patch?

Here, I added your ack.

diff --git a/fs/ocfs2/extent_map.c b/fs/ocfs2/extent_map.c
index d35a27f..5328529 100644
--- a/fs/ocfs2/extent_map.c
+++ b/fs/ocfs2/extent_map.c
@@ -192,7 +192,7 @@ static int ocfs2_try_to_merge_extent_map(struct ocfs2_extent_map_item *emi,
 		emi->ei_clusters += ins->ei_clusters;
 		return 1;
 	} else if ((ins->ei_phys + ins->ei_clusters) == emi->ei_phys &&
-		   (ins->ei_cpos + ins->ei_clusters) == emi->ei_phys &&
+		   (ins->ei_cpos + ins->ei_clusters) == emi->ei_cpos &&
 		   ins->ei_flags == emi->ei_flags) {
 		emi->ei_phys = ins->ei_phys;
 		emi->ei_cpos = ins->ei_cpos;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ