From: David Teigland <teigland@redhat.com>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 1/4] dlm: configfs lock
Date: Mon, 7 Nov 2005 15:02:39 -0600 [thread overview]
Message-ID: <20051107210239.GA4287@redhat.com> (raw)
Need to hold the subsys semaphore while accessing the children list.
Signed-off-by: David Teigland <teigland@redhat.com>
----
diff -ur a/drivers/dlm/config.c b/drivers/dlm/config.c
--- a/drivers/dlm/config.c 2005-08-22 14:48:26.450499104 +0800
+++ b/drivers/dlm/config.c 2005-08-22 14:49:36.767809248 +0800
@@ -627,12 +627,14 @@
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 @@
break;
}
}
+ up(&clusters_root.subsys.su_sem);
if (found)
config_item_get(i);
reply other threads:[~2005-11-07 21:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051107210239.GA4287@redhat.com \
--to=teigland@redhat.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox