From: Jeff Moyer <jmoyer@redhat.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: Ming Lei <tom.leiming@gmail.com>,
linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] block: fix mq request allocation
Date: Mon, 02 Dec 2013 14:14:45 -0500 [thread overview]
Message-ID: <x49y5435al6.fsf@segfault.boston.devel.redhat.com> (raw)
In-Reply-To: <529CBA0A.8020703@kernel.dk> (Jens Axboe's message of "Mon, 02 Dec 2013 09:49:14 -0700")
Jens Axboe <axboe@kernel.dk> writes:
> On 12/02/2013 08:20 AM, Jeff Moyer wrote:
>> Ming Lei <tom.leiming@gmail.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
next prev parent reply other threads:[~2013-12-02 19:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-01 9:27 Ming Lei
2013-12-02 15:20 ` Jeff Moyer
2013-12-02 16:49 ` Jens Axboe
2013-12-02 19:14 ` Jeff Moyer [this message]
2013-12-03 1:33 ` Ming Lei
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=x49y5435al6.fsf@segfault.boston.devel.redhat.com \
--to=jmoyer@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=linux-kernel@vger.kernel.org \
--cc=tom.leiming@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®