projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e094f4f
)
dm: sysfs skip output when device is being destroyed
author
Milan Broz
<mbroz@redhat.com>
Mon, 22 Jun 2009 09:12:11 +0000
(10:12 +0100)
committer
Alasdair G Kergon
<agk@redhat.com>
Mon, 22 Jun 2009 09:12:11 +0000
(10:12 +0100)
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.
Cc: stable@kernel.org
Signed-off-by: Milan Broz <mbroz@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
drivers/md/dm.c
patch
|
blob
|
history
diff --git
a/drivers/md/dm.c
b/drivers/md/dm.c
index 48db308fae67103b221eeb1c10e4411560b88135..f1db689667ea5715c8378e171105dc07fafc33e0 100644
(file)
--- a/
drivers/md/dm.c
+++ b/
drivers/md/dm.c
@@
-1777,6
+1777,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;
}