From: NeilBrown Date: Mon, 14 Dec 2009 01:49:46 +0000 (+1100) Subject: md/bitmap: protect against bitmap removal while being updated. X-Git-Tag: v2.6.33-rc1~284^2~26 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa5cbd103887011b4830355f88fb055f9ad2d556;p=pandora-kernel.git md/bitmap: protect against bitmap removal while being updated. A write intent bitmap can be removed from an array while the array is active. When this happens, all IO is suspended and flushed before the bitmap is removed. However it is possible that bitmap_daemon_work is still running to clear old bits from the bitmap. If it is, it can dereference the bitmap after it has been freed. So introduce a new mutex to protect bitmap_daemon_work and get it before destroying a bitmap. This is suitable for any current -stable kernel. Signed-off-by: NeilBrown Cc: stable@kernel.org --- Reading git-diff-tree failed