All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Lyle <mlyle@lyle.org>
To: Coly Li <i@coly.li>
Cc: Coly Li <colyli@suse.de>,
	linux-bcache@vger.kernel.org, linux-block@vger.kernel.org,
	axboe@kernel.dk, Eric Wheeler <bcache@lists.ewheeler.net>,
	Byungchul Park <byungchul.park@lge.com>,
	Kent Overstreet <kent.overstreet@gmail.com>
Subject: Re: [PATCH 04/12] bcache: Don't reinvent the wheel but use existing llist API
Date: Tue, 26 Sep 2017 12:55:54 -0700	[thread overview]
Message-ID: <CAJ+L6qc1KAMrj6bpp2R7A=O1HmT=Gq_Wt6f4LVc6rAxQ=O8kwQ@mail.gmail.com> (raw)
In-Reply-To: <1433ecdd-3394-c65f-9588-4d2a20df25d5@coly.li>

Thanks everyone--

Yes, this looks good to me and works in testing.

Mike

On Tue, Sep 26, 2017 at 12:46 AM, Coly Li <i@coly.li> wrote:
> On 2017/9/26 =E4=B8=8B=E5=8D=8812:38, Michael Lyle wrote:
>> I believe this introduces a critical bug.
>>
>> cl->list is used to link together the llists for both things waiting,
>> and for things that are being woken.
>>
>> If a closure that is woken decides to wait again, it will corrupt the
>> llist that __closure_wake_up is using.
>>
>> The previous iteration structure gets the next element of the list
>> before waking and is therefore safe.
>
>
> Hi Michael and Byungchul,
>
> This is my fault to suggest Byungchul to change his correct patch into
> wrong one. But it's good to learn such an implicit race behind bcache
> code. I just post a patch to explain how this race may happen and
> corrupt the reverse list iteration. Could you please to review the fix ?
>
> And thanks to Michael again to catch this bug.
>
> --
> Coly Li

WARNING: multiple messages have this Message-ID (diff)
From: Michael Lyle <mlyle@lyle.org>
To: Coly Li <i@coly.li>
Cc: Coly Li <colyli@suse.de>,
	linux-bcache@vger.kernel.org, linux-block@vger.kernel.org,
	axboe@kernel.dk, Eric Wheeler <bcache@lists.ewheeler.net>,
	Byungchul Park <byungchul.park@lge.com>,
	Kent Overstreet <kent.overstreet@gmail.com>
Subject: Re: [PATCH 04/12] bcache: Don't reinvent the wheel but use existing llist API
Date: Tue, 26 Sep 2017 12:55:54 -0700	[thread overview]
Message-ID: <CAJ+L6qc1KAMrj6bpp2R7A=O1HmT=Gq_Wt6f4LVc6rAxQ=O8kwQ@mail.gmail.com> (raw)
In-Reply-To: <1433ecdd-3394-c65f-9588-4d2a20df25d5@coly.li>

Thanks everyone--

Yes, this looks good to me and works in testing.

Mike

On Tue, Sep 26, 2017 at 12:46 AM, Coly Li <i@coly.li> wrote:
> On 2017/9/26 下午12:38, Michael Lyle wrote:
>> I believe this introduces a critical bug.
>>
>> cl->list is used to link together the llists for both things waiting,
>> and for things that are being woken.
>>
>> If a closure that is woken decides to wait again, it will corrupt the
>> llist that __closure_wake_up is using.
>>
>> The previous iteration structure gets the next element of the list
>> before waking and is therefore safe.
>
>
> Hi Michael and Byungchul,
>
> This is my fault to suggest Byungchul to change his correct patch into
> wrong one. But it's good to learn such an implicit race behind bcache
> code. I just post a patch to explain how this race may happen and
> corrupt the reverse list iteration. Could you please to review the fix ?
>
> And thanks to Michael again to catch this bug.
>
> --
> Coly Li

  reply	other threads:[~2017-09-26 19:55 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-06  6:25 [PATCH 00/13] bcache: fixes and update for 4.14 Coly Li
2017-09-06  6:25 ` [PATCH 01/12] bcache: Fix leak of bdev reference Coly Li
2017-09-06  6:25 ` [PATCH 02/12] bcache: fix sequential large write IO bypass Coly Li
2017-09-06  6:25 ` [PATCH 03/12] bcache: do not subtract sectors_to_gc for bypassed IO Coly Li
2017-09-06  6:25 ` [PATCH 04/12] bcache: Don't reinvent the wheel but use existing llist API Coly Li
2017-09-26  4:38   ` Michael Lyle
2017-09-26  6:39     ` 박병철/선임연구원/SW Platform(연)AOT팀(byungchul.park@lge.com)
2017-09-26  6:39       ` 박병철/선임연구원/SW Platform(연)AOT팀(byungchul.park@lge.com)
2017-09-26  7:09       ` Coly Li
2017-09-26  7:15         ` 박병철/선임연구원/SW Platform(연)AOT팀(byungchul.park@lge.com)
2017-09-26  7:15           ` 박병철/선임연구원/SW Platform(연)AOT팀(byungchul.park@lge.com)
2017-09-26  7:22           ` Coly Li
2017-09-26  7:08     ` Coly Li
2017-09-26  7:16       ` 박병철/선임연구원/SW Platform(연)AOT팀(byungchul.park@lge.com)
2017-09-26  7:16         ` 박병철/선임연구원/SW Platform(연)AOT팀(byungchul.park@lge.com)
2017-09-26  7:24         ` Coly Li
2017-09-26  7:46     ` Coly Li
2017-09-26 19:55       ` Michael Lyle [this message]
2017-09-26 19:55         ` Michael Lyle
2017-09-06  6:25 ` [PATCH 05/12] bcache: gc does not work when triggering by manual command Coly Li
2017-09-06  6:25 ` [PATCH 06/12] bcache: correct cache_dirty_target in __update_writeback_rate() Coly Li
2017-09-06  6:25 ` [PATCH 07/12] bcache: Correct return value for sysfs attach errors Coly Li
2017-09-06  6:25 ` [PATCH 08/12] bcache: increase the number of open buckets Coly Li
2017-09-06  6:25   ` Coly Li
2017-09-06  6:25 ` [PATCH 09/12] bcache: fix for gc and write-back race Coly Li
2017-09-06  6:26 ` [PATCH 10/12] bcache: silence static checker warning Coly Li
2017-09-06  6:26 ` [PATCH 11/12] bcache: Update continue_at() documentation Coly Li
2017-09-06  6:26 ` [PATCH 12/12] bcache: fix bch_hprint crash and improve output Coly Li
2017-09-06 14:20 ` [PATCH 00/13] bcache: fixes and update for 4.14 Jens Axboe
2017-09-06 15:41   ` Coly Li
2017-09-06 15:46     ` Jens Axboe
2017-09-06 17:38       ` Coly Li
2017-09-07 18:51         ` Eddie Chapman
2017-09-07 19:31           ` Jens Axboe
2017-09-07 19:01         ` Eddie Chapman

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+L6qc1KAMrj6bpp2R7A=O1HmT=Gq_Wt6f4LVc6rAxQ=O8kwQ@mail.gmail.com' \
    --to=mlyle@lyle.org \
    --cc=axboe@kernel.dk \
    --cc=bcache@lists.ewheeler.net \
    --cc=byungchul.park@lge.com \
    --cc=colyli@suse.de \
    --cc=i@coly.li \
    --cc=kent.overstreet@gmail.com \
    --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.