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: <161e938d-929b-1fdb-ba77-56b839c14b5b@acm.org>
Date:   Thu, 9 Apr 2020 20:12:21 -0700
From:   Bart Van Assche <bvanassche@....org>
To:     Luis Chamberlain <mcgrof@...nel.org>, axboe@...nel.dk,
        viro@...iv.linux.org.uk, gregkh@...uxfoundation.org,
        rostedt@...dmis.org, mingo@...hat.com, jack@...e.cz,
        ming.lei@...hat.com, nstange@...e.de, akpm@...ux-foundation.org
Cc:     mhocko@...e.com, yukuai3@...wei.com, linux-block@...r.kernel.org,
        linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, Omar Sandoval <osandov@...com>,
        Hannes Reinecke <hare@...e.com>,
        Michal Hocko <mhocko@...nel.org>
Subject: Re: [RFC v2 5/5] block: revert back to synchronous request_queue
 removal

On 2020-04-09 14:45, Luis Chamberlain wrote:
> blk_put_queue() puts decrements the refcount for the request_queue
                  ^^^^
        can this word be left out?

> diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
> index 8b1cab52cef9..46fee1ef92e3 100644
> --- a/include/linux/blkdev.h
> +++ b/include/linux/blkdev.h
> @@ -614,6 +614,7 @@ struct request_queue {
>  #define QUEUE_FLAG_PCI_P2PDMA	25	/* device supports PCI p2p requests */
>  #define QUEUE_FLAG_ZONE_RESETALL 26	/* supports Zone Reset All */
>  #define QUEUE_FLAG_RQ_ALLOC_TIME 27	/* record rq->alloc_time_ns */
> +#define QUEUE_FLAG_DEFER_REMOVAL 28	/* defer queue removal */
>  
>  #define QUEUE_FLAG_MQ_DEFAULT	((1 << QUEUE_FLAG_IO_STAT) |		\
>  				 (1 << QUEUE_FLAG_SAME_COMP))
> @@ -648,6 +649,8 @@ bool blk_queue_flag_test_and_set(unsigned int flag, struct request_queue *q);
>  #else
>  #define blk_queue_rq_alloc_time(q)	false
>  #endif
> +#define blk_queue_defer_removal(q) \
> +	test_bit(QUEUE_FLAG_DEFER_REMOVAL, &(q)->queue_flags)

Since blk_queue_defer_removal() has no callers the code that depends on
QUEUE_FLAG_DEFER_REMOVAL to be set will be subject to bitrot. It would
make me happy if the QUEUE_FLAG_DEFER_REMOVAL flag and the code that
depends on that flag would be removed.

Please add a might_sleep() call in blk_put_queue() since with this patch
applied it is no longer allowed to call blk_put_queue() from atomic context.

Thanks,

Bart.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ