aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Richter <stefanr@s5r6.in-berlin.de>2006-09-06 13:04:00 -0400
committerStefan Richter <stefanr@s5r6.in-berlin.de>2006-09-17 13:38:43 -0400
commita1842be898a2295ef513ed0a5d26f65d6283cb11 (patch)
tree41065a6271b2c6247752d545227f7e9b2038ac27
parent9b516010863195ba7db061233a3eeffe779130e8 (diff)
ieee1394: nodemgr: grab class.subsys.rwsem in nodemgr_resume_ne
nodemgr_resume_ne was iterating over nodemgr_ud_class.children without protection by nodemgr_ud_class.subsys.rwsem. FIXME: Shouldn't we rather use class->sem there, not class->subsys.rwsem? Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
-rw-r--r--drivers/ieee1394/nodemgr.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c
index f087f7e2b691..3e7974c57443 100644
--- a/drivers/ieee1394/nodemgr.c
+++ b/drivers/ieee1394/nodemgr.c
@@ -1352,6 +1352,7 @@ static void nodemgr_resume_ne(struct node_entry *ne)
1352 ne->in_limbo = 0; 1352 ne->in_limbo = 0;
1353 device_remove_file(&ne->device, &dev_attr_ne_in_limbo); 1353 device_remove_file(&ne->device, &dev_attr_ne_in_limbo);
1354 1354
1355 down_read(&nodemgr_ud_class.subsys.rwsem);
1355 down_read(&ne->device.bus->subsys.rwsem); 1356 down_read(&ne->device.bus->subsys.rwsem);
1356 list_for_each_entry(cdev, &nodemgr_ud_class.children, node) { 1357 list_for_each_entry(cdev, &nodemgr_ud_class.children, node) {
1357 ud = container_of(cdev, struct unit_directory, class_dev); 1358 ud = container_of(cdev, struct unit_directory, class_dev);
@@ -1363,6 +1364,7 @@ static void nodemgr_resume_ne(struct node_entry *ne)
1363 ud->device.driver->resume(&ud->device); 1364 ud->device.driver->resume(&ud->device);
1364 } 1365 }
1365 up_read(&ne->device.bus->subsys.rwsem); 1366 up_read(&ne->device.bus->subsys.rwsem);
1367 up_read(&nodemgr_ud_class.subsys.rwsem);
1366 1368
1367 HPSB_DEBUG("Node resumed: ID:BUS[" NODE_BUS_FMT "] GUID[%016Lx]", 1369 HPSB_DEBUG("Node resumed: ID:BUS[" NODE_BUS_FMT "] GUID[%016Lx]",
1368 NODE_BUS_ARGS(ne->host, ne->nodeid), (unsigned long long)ne->guid); 1370 NODE_BUS_ARGS(ne->host, ne->nodeid), (unsigned long long)ne->guid);