stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "md/bitmap: don't pass -1 to bitmap_storage_alloc." has been added to the 4.1-stable tree
@ 2015-10-18  0:34 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2015-10-18  0:34 UTC (permalink / raw)
  To: neilb, gregkh; +Cc: stable, stable-commits


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 <stable@vger.kernel.org> know about it.


>From da6fb7a9e5bd6f04f7e15070f630bdf1ea502841 Mon Sep 17 00:00:00 2001
From: NeilBrown <neilb@suse.com>
Date: Thu, 1 Oct 2015 16:03:38 +1000
Subject: md/bitmap: don't pass -1 to bitmap_storage_alloc.

From: NeilBrown <neilb@suse.com>

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")
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/md/bitmap.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/md/bitmap.c
+++ b/drivers/md/bitmap.c
@@ -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 neilb@suse.com 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-10-18  0:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-18  0:34 Patch "md/bitmap: don't pass -1 to bitmap_storage_alloc." has been added to the 4.1-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).