From: David Teigland Need to hold the subsys semaphore while accessing the children list. Signed-off-by: David Teigland Signed-off-by: Andrew Morton --- drivers/dlm/config.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletion(-) diff -puN drivers/dlm/config.c~dlm-use-configfs-fix-2 drivers/dlm/config.c --- devel/drivers/dlm/config.c~dlm-use-configfs-fix-2 2005-11-07 19:18:53.000000000 -0800 +++ devel-akpm/drivers/dlm/config.c 2005-11-07 19:18:53.000000000 -0800 @@ -627,12 +627,14 @@ static void put_space(struct space *sp) static struct comm *get_comm(int nodeid, struct sockaddr_storage *addr) { struct config_item *i; - struct comm *cm; + struct comm *cm = NULL; int found = 0; if (!comm_list) return NULL; + down(&clusters_root.subsys.su_sem); + list_for_each_entry(i, &comm_list->cg_children, ci_entry) { cm = to_comm(i); @@ -649,6 +651,7 @@ static struct comm *get_comm(int nodeid, break; } } + up(&clusters_root.subsys.su_sem); if (found) config_item_get(i); _