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:   Thu, 4 Apr 2019 14:53:37 +0800
From:   Ming Lei <tom.leiming@...il.com>
To:     Dongli Zhang <dongli.zhang@...cle.com>
Cc:     Jens Axboe <axboe@...nel.dk>,
        linux-block <linux-block@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/1] blk-mq: do not reset plug->rq_count before the list
 is sorted

On Thu, Apr 4, 2019 at 10:54 AM Dongli Zhang <dongli.zhang@...cle.com> wrote:
>
> We would never be able to sort the list if we first reset plug->rq_count
> which is used in conditional check later.
>
> Fixes: ce5b009cff19 ("block: improve logic around when to sort a plug list")
> Signed-off-by: Dongli Zhang <dongli.zhang@...cle.com>
> ---
>  block/blk-mq.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/block/blk-mq.c b/block/blk-mq.c
> index 3ff3d7b..c162718 100644
> --- a/block/blk-mq.c
> +++ b/block/blk-mq.c
> @@ -1711,11 +1711,12 @@ void blk_mq_flush_plug_list(struct blk_plug *plug, bool from_schedule)
>         unsigned int depth;
>
>         list_splice_init(&plug->mq_list, &list);
> -       plug->rq_count = 0;
>
>         if (plug->rq_count > 2 && plug->multiple_queues)
>                 list_sort(NULL, &list, plug_rq_cmp);
>
> +       plug->rq_count = 0;
> +
>         this_q = NULL;
>         this_hctx = NULL;
>         this_ctx = NULL;
> --
> 2.7.4
>

Reviewed-by: Ming Lei <ming.lei@...hat.com>

Thanks,
Ming Lei

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ