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-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 2 Oct 2013 20:17:38 -0700
From:	Kent Overstreet <kmo@...erainc.com>
To:	Mike Snitzer <snitzer@...hat.com>
Cc:	axboe@...nel.dk, linux-kernel@...r.kernel.org,
	linux-raid@...r.kernel.org, dm-devel@...hat.com,
	linux-fsdevel@...r.kernel.org, Alasdair Kergon <agk@...hat.com>
Subject: Re: [PATCH 16/22] dm: Refactor for new bio cloning/splitting

On Sat, Sep 28, 2013 at 12:59:09AM -0400, Mike Snitzer wrote:
> Hey Kent,
> 
> I haven't been able to pinpoint the issue yet, but using your for-jens
> branch, if I create a dm-thin volume with this lvm command:
> lvcreate -L20G -V20G -T vg/pool --name thinlv
> 
> and try to format /dev/vg/thinlv with XFS the kernel warns and then
> hangs with the following:

Thanks, for whatever reason ext4 wasn't tickling that codepath but xfs
does. I folded the fix into my for-jens branch, here's what changed:

diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index b60b350..79cee1a 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -1098,7 +1098,7 @@ static void clone_bio(struct dm_target_io *tio, struct bio *bio,
 		bio_integrity_clone(clone, bio, GFP_NOIO);
 
 	bio_advance(clone, to_bytes(sector - clone->bi_iter.bi_sector));
-	bio->bi_iter.bi_size = to_bytes(len);
+	clone->bi_iter.bi_size = to_bytes(len);
 
 	if (bio_integrity(bio))
 		bio_integrity_trim(clone, 0, len);
@@ -1267,7 +1267,7 @@ static int __split_and_process_non_flush(struct clone_info *ci)
 	if (!dm_target_is_valid(ti))
 		return -EIO;
 
-	len = min_t(unsigned, max_io_len(ci->sector, ti), bio_sectors(bio));
+	len = min_t(sector_t, max_io_len(ci->sector, ti), ci->sector_count);
 
 	__clone_and_map_data_bio(ci, ti, ci->sector, len);
 
--
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