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]
Date:	Fri, 18 Dec 2015 23:02:31 +0800
From:	Minfei Huang <mnfhuang@...il.com>
To:	axboe@...nel.dk
Cc:	linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
	mhuang@...hat.com, Minfei Huang <mnfhuang@...il.com>
Subject: [PATCH 1/2] bio: Remove the incorrect test for idx in __bio_clone_fast

It is more lucky that kernel crash does not happen, since we test the
bi_pool in function __bio_clone_fast. Now bi_flags is used to flag the
idx, so it is incorrect to test the bi_pool.

For now, the bio in function __bio_clone_fast may have its own bvec, if
the caller is bio_clone_fast.

Removing the test to fix this issue.

Signed-off-by: Minfei Huang <mnfhuang@...il.com>
---
 block/bio.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/block/bio.c b/block/bio.c
index 4f184d9..70d9814 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -573,8 +573,6 @@ EXPORT_SYMBOL(bio_phys_segments);
  */
 void __bio_clone_fast(struct bio *bio, struct bio *bio_src)
 {
-	BUG_ON(bio->bi_pool && BIO_POOL_IDX(bio) != BIO_POOL_NONE);
-
 	/*
 	 * most users will be overriding ->bi_bdev with a new target,
 	 * so we don't set nor calculate new physical/hw segment counts here
-- 
2.6.3

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