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: <5025080A.1040001@fusionio.com>
Date:	Fri, 10 Aug 2012 15:09:30 +0200
From:	Jens Axboe <jaxboe@...ionio.com>
To:	Jianpeng Ma <majianpeng@...il.com>
CC:	shli <shli@...nel.org>, linux-kernel <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 2/3] block: Fix not tracing all device plug-operation.

On 08/10/2012 01:46 PM, Jianpeng Ma wrote:
> If process handled two or more devices,there will not be trace some
> devices plug-operation.
> 
> Signed-off-by: Jianpeng Ma <majianpeng@...il.com>
> ---
>  block/blk-core.c |   16 +++++++++++++++-
>  1 file changed, 15 insertions(+), 1 deletion(-)
> 
> diff --git a/block/blk-core.c b/block/blk-core.c
> index 7a3abc6..034f186 100644
> --- a/block/blk-core.c
> +++ b/block/blk-core.c
> @@ -1521,11 +1521,25 @@ get_rq:
>  				struct request *__rq;
>  
>  				__rq = list_entry_rq(plug->list.prev);
> -				if (__rq->q != q)
> +				if (__rq->q != q) {
>  					plug->should_sort = 1;
> +					trace_block_plug(q);
> +				}
> +			} else {
> +				struct request *__rq;
> +				list_for_each_entry_reverse(__rq, &plug->list,
> +					queuelist) {
> +					if (__rq->q == q) {
> +						list_add_tail(&req->queuelist,
> +							&__rq->queuelist);
> +						goto stat_acct;

Did you verify this? It doesn't look right to me. You browse the list in
reverse, which means __rq is the first one that has a matching q. Then
you add the new req IN FRONT of that. You would want list_add() here
instead, adding it as the last member of that q string, not in the
middle.

-- 
Jens Axboe

--
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