From: Greg Kroah-Hartman Date: Tue, 30 Jun 2009 19:08:20 +0000 (-0700) Subject: .29 patch X-Git-Tag: v2.6.27.26~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f7cba7f064a10643d06ab00b069ec512a298bf79;p=thirdparty%2Fkernel%2Fstable-queue.git .29 patch --- diff --git a/queue-2.6.29/dm-sysfs-skip-output-when-device-is-being-destroyed.patch b/queue-2.6.29/dm-sysfs-skip-output-when-device-is-being-destroyed.patch new file mode 100644 index 00000000000..4f88803a9cf --- /dev/null +++ b/queue-2.6.29/dm-sysfs-skip-output-when-device-is-being-destroyed.patch @@ -0,0 +1,36 @@ +From 4d89b7b4e4726893453d0fb4ddbb5b3e16353994 Mon Sep 17 00:00:00 2001 +From: Milan Broz +Date: Mon, 22 Jun 2009 10:12:11 +0100 +Subject: dm: sysfs skip output when device is being destroyed + +From: Milan Broz + +commit 4d89b7b4e4726893453d0fb4ddbb5b3e16353994 upstream. + +Do not process sysfs attributes when device is being destroyed. + +Otherwise code can cause + BUG_ON(test_bit(DMF_FREEING, &md->flags)); +in dm_put() call. + +Signed-off-by: Milan Broz +Signed-off-by: Alasdair G Kergon +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/md/dm.c | 4 ++++ + 1 file changed, 4 insertions(+) + +--- a/drivers/md/dm.c ++++ b/drivers/md/dm.c +@@ -1728,6 +1728,10 @@ struct mapped_device *dm_get_from_kobjec + if (&md->kobj != kobj) + return NULL; + ++ if (test_bit(DMF_FREEING, &md->flags) || ++ test_bit(DMF_DELETING, &md->flags)) ++ return NULL; ++ + dm_get(md); + return md; + } diff --git a/queue-2.6.29/series b/queue-2.6.29/series index 9a7bcc5e6fd..4eeabe66b75 100644 --- a/queue-2.6.29/series +++ b/queue-2.6.29/series @@ -34,3 +34,4 @@ sound-seq_midi_event-fix-decoding-of-rpn-events.patch mm-fix-handling-of-pagesets-for-downed-cpus.patch dm-mpath-validate-table-argument-count.patch dm-mpath-validate-hw_handler-argument-count.patch +dm-sysfs-skip-output-when-device-is-being-destroyed.patch