Skip to contentSkip to conversation

Patch "md/bitmap: don't pass -1 to bitmap_storage_alloc." has been added to the 4.2-stable tree

PATCH [email protected] 1 participant 1 message Oct 18, 2015 Stable branch

lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

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.2-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.2 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 da6fb7a9e5bd6f04f7e15070f630bdf1ea502841 Mon 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().

Fixes b97e92574c0b ("Use separate bitmaps for each nodes in the cluster")
---
 drivers/md/bitmap.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/md/bitmap.c +2 -1
@@ -1997,7 +1997,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.2/md-bitmap-don-t-pass-1-to-bitmap_storage_alloc.patch queue-4.2/md-raid0-update-queue-parameter-in-a-safer-location.patch queue-4.2/md-raid0-apply-base-queue-limits-before-disk_stack_limits.patch queue-4.2/nfsv4-recovery-of-recalled-read-delegations-is-broken.patch