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:	Mon, 02 Dec 2013 14:14:45 -0500
From:	Jeff Moyer <jmoyer@...hat.com>
To:	Jens Axboe <axboe@...nel.dk>
Cc:	Ming Lei <tom.leiming@...il.com>, linux-kernel@...r.kernel.org,
	Andrew Morton <akpm@...ux-foundation.org>
Subject: Re: [PATCH] block: fix mq request allocation

Jens Axboe <axboe@...nel.dk> writes:

> On 12/02/2013 08:20 AM, Jeff Moyer wrote:
>> Ming Lei <tom.leiming@...il.com> writes:
>> 
>>> blk_mq_alloc_request_pinned() may return NULL request in case of
>>> !__GFP_WAIT, so cause its callers to derefence NULL pointer for
>>> releasing current context.
>>>
>>> This patch introduces two flags to address the issue.
>> 
>> Hi, Ming,
>> 
>> 
>> Good catch, but your patch seems overly complicated.  How about
>> something like the following (compile-tested only), instead?  Note that
>> I did not touch blk_make_request, as the put_ctx there seems to
>> correlate to a get_ctx earlier in the function (not a leaked reference
>> from __blk_mq_alloc_request).
>
> I would tend to agree, it's overly complicated. The bug is real, however.

Hmm, did I make it sound as though I thought it wasn't a bug?  Your
response leaves me wondering whether my patch made it to your inbox.

>> p.s. Jens, every time I see GFP_ATOMIC|__GFP_WAIT, my head explodes.  Just sayin'.
>
> It's perfectly fine :-)

Sure, it's not *your* head!  ;-)

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