[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tkrat.249c4dbc1c15282d@s5r6.in-berlin.de>
Date: Wed, 6 Sep 2006 19:06:36 +0200 (CEST)
From: Stefan Richter <stefanr@...6.in-berlin.de>
To: linux1394-devel@...ts.sourceforge.net
cc: linux-kernel@...r.kernel.org, Andrew Morton <akpm@...l.org>,
Miles Lane <miles.lane@...il.com>,
Herbert Xu <herbert@...dor.apana.org.au>,
Ben Collins <bcollins@...ntu.com>, Greg KH <gregkh@...e.de>
Subject: [RFT PATCH 2/2] 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@...6.in-berlin.de>
---
Index: linux/drivers/ieee1394/nodemgr.c
===================================================================
--- linux.orig/drivers/ieee1394/nodemgr.c 2006-09-06 18:34:35.000000000 +0200
+++ linux/drivers/ieee1394/nodemgr.c 2006-09-06 18:38:20.000000000 +0200
@@ -1352,6 +1352,7 @@ static void nodemgr_resume_ne(struct nod
ne->in_limbo = 0;
device_remove_file(&ne->device, &dev_attr_ne_in_limbo);
+ down_read(&nodemgr_ud_class.subsys.rwsem);
down_read(&ne->device.bus->subsys.rwsem);
list_for_each_entry(cdev, &nodemgr_ud_class.children, node) {
ud = container_of(cdev, struct unit_directory, class_dev);
@@ -1363,6 +1364,7 @@ static void nodemgr_resume_ne(struct nod
ud->device.driver->resume(&ud->device);
}
up_read(&ne->device.bus->subsys.rwsem);
+ up_read(&nodemgr_ud_class.subsys.rwsem);
HPSB_DEBUG("Node resumed: ID:BUS[" NODE_BUS_FMT "] GUID[%016Lx]",
NODE_BUS_ARGS(ne->host, ne->nodeid), (unsigned long long)ne->guid);
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists