Re: [PATCH] bcache: fix uninitialized closure object
Jens Axboe <[email protected]> Tue, 7 Apr 2026 06:44:02 -0600
| Newsgroups | org.kernel.vger.linux-bcache |
|---|---|
| Message-ID | <[email protected]> |
On 4/7/26 3:28 AM, Coly Li wrote: >> 2026?4?3? 19:11?Jens Axboe <[email protected]> ??? >> >> On 4/2/26 10:21 PM, [email protected] wrote: >>> From: Mingzhe Zou <[email protected]> >>> >>> 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