On Wed, Oct 22, 2025 at 09:53:07AM +0200, Jack Wang wrote:
From: Greg Kroah-Hartman gregkh@linuxfoundation.org
6.12-stable review patch. If anyone has any objections, please let me know.
From: John Garry john.g.garry@oracle.com
[ Upstream commit 74538fdac3e85aae55eb4ed786478ed2384cb85d ]
Add proper bio_split() error handling. For any error, set bi_status, end the bio, and return.
Reviewed-by: Yu Kuai yukuai3@huawei.com Reviewed-by: Hannes Reinecke hare@suse.de Signed-off-by: John Garry john.g.garry@oracle.com Link: https://lore.kernel.org/r/20241111112150.3756529-5-john.g.garry@oracle.com Signed-off-by: Jens Axboe axboe@kernel.dk Stable-dep-of: 22f166218f73 ("md: fix mssing blktrace bio split events") Signed-off-by: Sasha Levin sashal@kernel.org Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org --- a/drivers/md/raid0.c +++ b/drivers/md/raid0.c @@ -464,6 +464,12 @@ static void raid0_handle_discard(struct struct bio *split = bio_split(bio, zone->zone_end - bio->bi_iter.bi_sector, GFP_NOIO, &mddev->bio_set);
if (IS_ERR(split)) {
bio->bi_status = errno_to_blk_status(PTR_ERR(split));
bio_endio(bio);
return;
}
The version of bio_split return NULL or valid pointer, so we need adapt the check to if (IS_ERR_OR_NULL(split)) for all the 3 commits about Handle bio_split() errors for md/raidx.
Sorry, I do not understand the request here, is this not ok as-is?