Patch "md/bitmap: don't pass -1 to bitmap_storage_alloc." has been added to the 4.1-stable tree
This is a note to let you know that I've just added the patch titled
md/bitmap: don't pass -1 to bitmap_storage_alloc.
to the 4.1-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
md-bitmap-don-t-pass-1-to-bitmap_storage_alloc.patch
and it can be found in the queue-4.1 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
da6fb7a9e5bd6f04f7e15070f630bdf1ea502841Mon Sep 17 00:00:00 2001
From: NeilBrown <[email protected]>
Date: Thu, 1 Oct 2015 16:03:38 +1000
Subject: md/bitmap: don't pass -1 to bitmap_storage_alloc.
From: NeilBrown <[email protected]>
commit da6fb7a9e5bd6f04f7e15070f630bdf1ea502841 upstream.
Passing -1 to bitmap_storage_alloc() causes page->index to be set to -1, which is quite problematic.
So only pass ->cluster_slot if mddev_is_clustered().
--- drivers/md/bitmap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/md/bitmap.c +2 -1
@@ -2000,7 +2000,8 @@ int bitmap_resize(struct bitmap *bitmap,if (bitmap->mddev->bitmap_info.offset || bitmap->mddev->bitmap_info.file) ret =bitmap_storage_alloc (&store, chunks, !bitmap->mddev->bitmap_info.external, - bitmap->cluster_slot); +mddev_is_clustered (bitmap->mddev) + ? bitmap->cluster_slot :0 );if (ret) goto err;
Patches currently in stable-queue which might be from [email protected] are
queue-4.1/md-bitmap-don-t-pass-1-to-bitmap_storage_alloc.patch queue-4.1/md-raid0-update-queue-parameter-in-a-safer-location.patch queue-4.1/md-raid0-apply-base-queue-limits-before-disk_stack_limits.patch