* [PATCH] Do not process sysfs attributes when device is being destructed
@ 2009-05-31 20:55 Milan Broz
0 siblings, 0 replies; only message in thread
From: Milan Broz @ 2009-05-31 20:55 UTC (permalink / raw)
To: device-mapper development
Do not process sysfs attributes when device is being destructed.
Otherwise code can cause
BUG_ON(test_bit(DMF_FREEING, &md->flags));
in dm_put() call.
Signed-off-by: Milan Broz <mbroz@redhat.com>
---
drivers/md/dm.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/drivers/md/dm.c b/drivers/md/dm.c
index f43b099..9d3595b 100644
--- a/drivers/md/dm.c
+++ b/drivers/md/dm.c
@@ -1806,6 +1806,10 @@ struct mapped_device *dm_get_from_kobject(struct kobject *kobj)
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;
}
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2009-05-31 20:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-31 20:55 [PATCH] Do not process sysfs attributes when device is being destructed Milan Broz
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.