All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Coly Li <colyli@fnnas.com>
Cc: linux-block@vger.kerenl.org, linux-bcache@vger.kernel.org,
	Mingzhe Zou <mingzhe.zou@easystack.cn>
Subject: Re: [PATCH] bcache: fix uninitialized closure object
Date: Tue, 7 Apr 2026 06:44:02 -0600	[thread overview]
Message-ID: <2ca022fe-d448-4436-9b83-010cc664caa2@kernel.dk> (raw)
In-Reply-To: <17585F9E-8055-444F-A40E-50CD0AA92F72@fnnas.com>

On 4/7/26 3:28 AM, Coly Li wrote:
>> 2026?4?3? 19:11?Jens Axboe <axboe@kernel.dk> ???
>>
>> On 4/2/26 10:21 PM, colyli@fnnas.com wrote:
>>> From: Mingzhe Zou <mingzhe.zou@easystack.cn>
>>>
>>> In the previous patch ("bcache: fix cached_dev.sb_bio use-after-free and
>>> crash"), we adopted a simple modification suggestion from AI to fix the
>>> use-after-free.
>>>
>>> But in actual testing, we found an extreme case where the device is
>>> stopped before calling bch_write_bdev_super().
>>>
>>> At this point, struct closure sb_write has not been initialized yet.
>>> For this patch, we ensure that sb_bio has been completed via
>>> sb_write_mutex.
>>
>> Presumably this should have a:
>>
>> Fixes: fec114a98b87 ("bcache: fix cached_dev.sb_bio use-after-free and crash")
>>
>> but for some reason it does not. I'll add it.
> 
> I did it on purpose. Because this patch is in Linux-stable and not in mainline,
> I am not sure whether it is proper to reference the linux-block tree commit id.
> 
> This is why the patch title is mentioned in commit log, but commit id skipped.

Why is the patch in stable and not in mainline?! That should generally
never happen.

-- 
Jens Axboe

  reply	other threads:[~2026-04-07 12:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-03  4:21 [PATCH] bcache: fix uninitialized closure object colyli
2026-04-03 11:11 ` Jens Axboe
2026-04-07  9:28   ` Coly Li
2026-04-07 12:44     ` Jens Axboe [this message]
2026-04-07 13:19       ` Coly Li
2026-04-07 13:24         ` Jens Axboe
2026-04-07 14:09           ` Coly Li
2026-04-03 11:11 ` Jens Axboe
  -- strict thread matches above, loose matches on Subject: below --
2026-04-22 15:42 colyli
2026-04-22 15:21 colyli
2026-04-23  4:55 ` Greg KH
2026-04-02 13:03 mingzhe.zou
2026-04-03  4:04 ` Coly Li

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=2ca022fe-d448-4436-9b83-010cc664caa2@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=colyli@fnnas.com \
    --cc=linux-bcache@vger.kernel.org \
    --cc=linux-block@vger.kerenl.org \
    --cc=mingzhe.zou@easystack.cn \
    /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.