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]
Message-ID: <20150621101055.GD5915@lst.de>
Date:	Sun, 21 Jun 2015 12:10:55 +0200
From:	Christoph Hellwig <hch@....de>
To:	Dan Williams <dan.j.williams@...el.com>
Cc:	axboe@...nel.dk, linux-nvdimm@...ts.01.org, boaz@...xistor.com,
	toshi.kani@...com, Vishal Verma <vishal.l.verma@...ux.intel.com>,
	linux-kernel@...r.kernel.org, hch@....de,
	linux-acpi@...r.kernel.org, linux-fsdevel@...r.kernel.org,
	mingo@...nel.org
Subject: Re: [PATCH 11/15] libnvdimm: pmem, blk, and btt make_request
	cleanups

One patch per driver please.

> diff --git a/drivers/nvdimm/blk.c b/drivers/nvdimm/blk.c
> index 8a6345797a71..9d609ef95266 100644
> --- a/drivers/nvdimm/blk.c
> +++ b/drivers/nvdimm/blk.c
> @@ -170,18 +170,12 @@ static void nd_blk_make_request(struct request_queue *q, struct bio *bio)
>  	struct bvec_iter iter;
>  	struct bio_vec bvec;
>  	int err = 0, rw;
> -	sector_t sector;
>  
> -	sector = bio->bi_iter.bi_sector;
> -	if (bio_end_sector(bio) > get_capacity(disk)) {
> +	if (unlikely(bio_end_sector(bio) > get_capacity(disk))) {
>  		err = -EIO;
>  		goto out;
>  	}
>  
> -	BUG_ON(bio->bi_rw & REQ_DISCARD);

If you remove the DISCARD check you can kill the max sectors one
as well, given that generic_make_request_checks() takes care of it.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ