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:	Tue, 6 Feb 2007 17:15:09 -0800
From:	Andrew Morton <akpm@...ux-foundation.org>
To:	Neil Brown <neilb@...e.de>
Cc:	"Kai" <epimetreus@...tmail.fm>, stable@...e.de, org@...e.de,
	linux-kernel@...r.kernel.org, Jens Axboe <jens.axboe@...cle.com>
Subject: Re: [PATCH] Re: Bio device too big | kernel BUG at
 mm/filemap.c:537!

On Wed, 7 Feb 2007 10:26:56 +1100
Neil Brown <neilb@...e.de> wrote:

> +static int bio_fits_rdev(struct bio *bi)
> +{
> +	request_queue_t *q = bdev_get_queue(bi->bi_bdev);
> +
> +	if ((bi->bi_size>>9) > q->max_sectors)
> +		return 0;
> +	blk_recount_segments(q, bi);
> +	if (bi->bi_phys_segments > q->max_phys_segments ||
> +	    bi->bi_hw_segments > q->max_hw_segments)
> +		return 0;
> +
> +	if (q->merge_bvec_fn)
> +		/* it's too hard to apply the merge_bvec_fn at this stage,
> +		 * just just give up
> +		 */
> +		return 0;
> +
> +	return 1;
> +}

Isn't think going to return 0 rather a lot of the time?

-
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