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, 15 Jul 2014 10:44:33 +0200
From:	Maurizio Lombardi <mlombard@...hat.com>
To:	Jens Axboe <axboe@...nel.dk>, Mike Qiu <qiudayu@...ux.vnet.ibm.com>
CC:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"ming.lei@...onical.com" <ming.lei@...onical.com>,
	"dongsu.park@...fitbricks.com" <dongsu.park@...fitbricks.com>,
	"jet.chen@...el.com" <jet.chen@...el.com>,
	"viro@...iv.linux.org.uk" <viro@...iv.linux.org.uk>,
	"hch@....de" <hch@....de>, "kmo@...erainc.com" <kmo@...erainc.com>,
	"akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
	"axboe@...com" <axboe@...com>
Subject: Re: Bug_ON with patch: bio: modify __bio_add_page() to accept pages
 that don't start a new segment



On 07/15/2014 10:41 AM, Jens Axboe wrote:
> On 15/07/2014, at 10.14, Mike Qiu <qiudayu@...ux.vnet.ibm.com> wrote:
>>
>> My Power7 box boot fail with commit:
>>
>> 254c4407cb84a6dec90336054615b0f0e996bb7c
>> bio: modify __bio_add_page() to accept pages that don't start a new segment
>>
>> Just revert it will works for me.
> 
> I have reverted it yesterday in my tree. 
> 


The problem was here:

        if (q->merge_bvec_fn) {
                struct bvec_merge_data bvm = {
                        .bi_bdev = bio->bi_bdev,
                        .bi_sector = bio->bi_iter.bi_sector,
                        .bi_size = bio->bi_iter.bi_size, <-------
                        .bi_rw = bio->bi_rw,
                };

                /*
                 * merge_bvec_fn() returns number of bytes it can accept
                 * at this offset
                 */
                if (q->merge_bvec_fn(q, &bvm, bvec) < bvec->bv_len)
                        goto failed;
        }

        /* If we may be able to merge these biovecs, force a recount */
        if (bio->bi_vcnt > 1 && (BIOVEC_PHYS_MERGEABLE(bvec-1, bvec)))
                bio->bi_flags &= ~(1 << BIO_SEG_VALID);


it should have been ".bi_size = bio->bi_iter.bi_size - len"

Regards,
Maurizio Lombardi
--
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