From: Michael Lyle <mlyle@lyle.org>
To: Jens Axboe <axboe@kernel.dk>
Cc: Coly Li <i@coly.li>,
linux-bcache@vger.kernel.org, linux-block@vger.kernel.org
Subject: Re: [PATCH 1/1] bcache: use llist_for_each_entry_safe() in __closure_wake_up()
Date: Wed, 27 Sep 2017 13:48:32 -0700 [thread overview]
Message-ID: <CAJ+L6qeQu0A17gGb1RVu8g_JvzcvJ2uSDj+9vC-hsUEFqM-fAw@mail.gmail.com> (raw)
In-Reply-To: <5986f13b-013d-5252-fc70-51dcd40e7335@kernel.dk>
Jens--
I think it's a race condition-- the individual closures remain valid.
It's just that the list element has different meanings-- it's either a
list actively being used to wake, or a linkage on one of several lists
that is being used to await wake. If a closure goes back to wait very
quickly after being woken, it can end up connecting its new wait-list
with the being-woken list.
Mike
On Wed, Sep 27, 2017 at 1:27 PM, Jens Axboe <axboe@kernel.dk> wrote:
> On 09/27/2017 09:16 PM, Coly Li wrote:
>> Hi Jens,
>>
>> Could you please take a look on this patch? It will be helpful if we can
>> have it in 4.14, then we can fix a bug introduced in 4.14-rc1.
>>
>> This patch is reported by Michael Lyle, reviewed by Byungchul Park, and
>> finally verified by Michael Lyle after I posted the patch.
>
> It looks fine to me, I'll get it queued up. BTW, it's technically
> a use-after-free bug, not a race condition.
>
> --
> Jens Axboe
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-bcache" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2017-09-27 20:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-26 9:54 [PATCH 0/1] bcache fix for 4.14-rc4 Coly Li
2017-09-26 9:54 ` [PATCH 1/1] bcache: use llist_for_each_entry_safe() in __closure_wake_up() Coly Li
2017-09-27 19:16 ` Coly Li
2017-09-27 20:27 ` Jens Axboe
2017-09-27 20:48 ` Michael Lyle [this message]
2017-09-27 20:52 ` Jens Axboe
2017-09-28 0:46 ` Coly Li
2017-09-27 20:29 ` Jens Axboe
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=CAJ+L6qeQu0A17gGb1RVu8g_JvzcvJ2uSDj+9vC-hsUEFqM-fAw@mail.gmail.com \
--to=mlyle@lyle.org \
--cc=axboe@kernel.dk \
--cc=i@coly.li \
--cc=linux-bcache@vger.kernel.org \
--cc=linux-block@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.