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: <1506960093.3368.21.camel@wdc.com>
Date:   Mon, 2 Oct 2017 16:01:34 +0000
From:   Bart Van Assche <Bart.VanAssche@....com>
To:     "linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
        "hch@...radead.org" <hch@...radead.org>,
        "jejb@...ux.vnet.ibm.com" <jejb@...ux.vnet.ibm.com>,
        "linux-block@...r.kernel.org" <linux-block@...r.kernel.org>,
        "axboe@...com" <axboe@...com>,
        "ming.lei@...hat.com" <ming.lei@...hat.com>,
        "martin.petersen@...cle.com" <martin.petersen@...cle.com>
CC:     Bart Van Assche <Bart.VanAssche@....com>,
        "martin@...htvoll.de" <martin@...htvoll.de>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "jthumshirn@...e.de" <jthumshirn@...e.de>,
        "oleksandr@...alenko.name" <oleksandr@...alenko.name>,
        "hare@...e.com" <hare@...e.com>,
        "cavery@...hat.com" <cavery@...hat.com>
Subject: Re: [PATCH V7 2/6] block: tracking request allocation with
 q_usage_counter

On Sat, 2017-09-30 at 14:12 +0800, Ming Lei wrote:
> @@ -1395,16 +1401,21 @@ static struct request *blk_old_get_request(struct request_queue *q,
>  					   unsigned int op, gfp_t gfp_mask)
>  {
>  	struct request *rq;
> +	int ret = 0;
>  
>  	WARN_ON_ONCE(q->mq_ops);
>  
>  	/* create ioc upfront */
>  	create_io_context(gfp_mask, q->node);
>  
> +	ret = blk_queue_enter(q, !(gfp_mask & __GFP_DIRECT_RECLAIM));
> +	if (ret)
> +		return ERR_PTR(ret);

Can the above blk_queue_enter() call block if the REQ_NOWAIT flag has been
set in the op argument and e.g. gfp_mask == GFP_KERNEL? If so, isn't that a
bug?

Bart.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ