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: <524EFD55.4050701@cs.wisc.edu>
Date:	Fri, 04 Oct 2013 12:39:33 -0500
From:	Mike Christie <michaelc@...wisc.edu>
To:	Christoph Hellwig <hch@...radead.org>
CC:	Jens Axboe <axboe@...nel.dk>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/5] [PATCH 2/5] revert: "blk-mq: blk-mq should free bios
 in pass through case"

On 10/4/13 8:49 AM, Christoph Hellwig wrote:
> This patch causes boot failures when using REQ_FLUSH requests.  Also the
> following statement in the commit log:
>
>      For non mq calls, the block layer will free the bios when
>      blk_finish_request is called.

Sorry, messed up function name. I meant blk_end_request*.

For blk_execute_rq_nowait/blk_execute_rq and normal request use, the 
lower levels free the bios as they are completed by one of the 
blk_finish_request* calls. The caller of of 
blk_execute_rq_nowait/blk_execute_rq does not have to worry about 
freeing bios. It just frees the request when it is done with it.

>
>      For mq calls, the blk mq code wants the caller to do this.

The problem was that Nick's scsi-mq code added a async
blk_mq_execute_rq support and it did not complete bios in the rq->end_io 
callback because he most likely expected it to work like the non-mq case 
above.

The goal of my patch was to make the underlying behavior and the 
function naming similar.

If we can get the the core block code to finish the bios as they are 
completed like is done in the non mq case like I was trying to do, then 
with your other patches in this set we do not need to have the rq end_io 
callbacks have this:

>   	if (q->mq_ops) {
> -		blk_mq_free_request(flush_rq);
> +		blk_mq_finish_request(flush_rq, error);
>   		spin_lock_irqsave(&q->mq_flush_lock, flags);


The block code would free the bios no matter who sent it and mq type, 
and the callers of blk_execute* would just call blk_put_request.
--
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