]> git.baikalelectronics.ru Git - kernel.git/commit
md: fix possible oops when removing a bitmap from an active array
authorNeilBrown <neilb@suse.de>
Fri, 23 May 2008 20:04:32 +0000 (13:04 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 24 May 2008 16:56:09 +0000 (09:56 -0700)
commitc32f83913515603646e12d106f2ce35b3d390df0
tree242c639d1e110f241e802e6b0a27a670deb8b174
parent8273cdc3550a993ebc8c84e8904055981300a351
md: fix possible oops when removing a bitmap from an active array

It is possible to add a write-intent bitmap to an active array, or remove
the bitmap that is there.

When we do with the 'quiesce' the array, which causes make_request to
block in "wait_barrier()".

However we are sampling the value of "mddev->bitmap" before the
wait_barrier call, and using it afterwards.  This can result in using a
bitmap structure that has been freed.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/md/raid1.c