Files
linux/drivers/md
Mingzhe Zou 20a8e451ec bcache: fix uninitialized closure object
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.

Signed-off-by: Mingzhe Zou <mingzhe.zou@easystack.cn>
Signed-off-by: Coly Li <colyli@fnnas.com>
Link: https://patch.msgid.link/20260403042135.2221247-1-colyli@fnnas.com
Fixes: fec114a98b ("bcache: fix cached_dev.sb_bio use-after-free and crash")
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2026-04-03 05:11:08 -06:00
..
2025-08-19 11:12:50 +02:00
2023-02-14 14:23:07 -05:00
2023-02-14 14:23:06 -05:00
2024-11-20 11:38:04 +01:00
2026-01-26 15:36:22 +01:00
2025-11-05 08:07:21 -07:00
2025-01-13 07:36:29 -08:00
2026-02-02 15:39:55 +08:00
2026-01-26 13:17:38 +08:00
2026-01-26 13:17:38 +08:00