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: <20131011041428.GB1692@kernel.org>
Date:	Fri, 11 Oct 2013 12:14:28 +0800
From:	Shaohua Li <shli@...nel.org>
To:	linux-kernel@...r.kernel.org, axboe@...nel.dk
Subject: [PATCH] null_blk: fix a bug in capacity calculation

the capacity calculation is obvious buggy.

Signed-off-by: Shaohua Li <shli@...ionio.com>
---
 drivers/block/null_blk.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: master/drivers/block/null_blk.c
===================================================================
--- master.orig/drivers/block/null_blk.c	2013-10-11 12:08:49.625163094 +0800
+++ master/drivers/block/null_blk.c	2013-10-11 12:08:49.625163094 +0800
@@ -555,7 +555,7 @@ err:
 	blk_queue_physical_block_size(nullb->q, bs);
 
 	size = gb * 1024 * 1024 * 1024ULL;
-	size = sector_div(size, bs);
+	sector_div(size, bs);
 	set_capacity(disk, size);
 
 	disk->flags |= GENHD_FL_EXT_DEVT;
--
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