[Cluster-devel] [PATCH] dlm: Fix spin lock already unlocked bug
Robert Peterson
rpeterso at redhat.com
Tue Jan 2 15:01:59 UTC 2007
Patrick Caulfield wrote:
> >From the "how the hell did that get in there" collection.
>
> I just noticed this message when testing some other changes I'd made to lowcomms (to use workqueues) but the problem seems to be in
> the current git trees too. I'm amazed no-one has seen it.
>
> BUG: spinlock already unlocked on CPU#1, dlm_recoverd/16868
>
> Please check this before committing it someone (everyone?), in case I'm hallucinating after all the christmas punch ;-)
>
>
> Signed-Off-By: Patrick Caulfield <pcaulfie at redhat.com>
>
>
> --- lowcomms-tcp.c 2007-01-02 13:51:40.000000000 +0000
> +++ lowcomms-tcp.c.new 2007-01-02 14:01:16.000000000 +0000
> @@ -709,6 +709,7 @@
> if (!con)
> return NULL;
>
> + spin_lock(&con->writequeue_lock);
> e = list_entry(con->writequeue.prev, struct writequeue_entry, list);
> if ((&e->list == &con->writequeue) ||
> (PAGE_CACHE_SIZE - e->end < len)) {
> @@ -747,6 +748,7 @@
> struct connection *con = e->con;
> int users;
>
> + spin_lock(&con->writequeue_lock);
> users = --e->users;
> if (users)
> goto out;
>
Hi Patrick,
For what it's worth: I haven't encountered the messages, and my previous
checkouts of lowcomms-tcp.c (2747 and 2876 of the RHEL5 kernels) all
seem to have these spin_locks already. I've looked through that code
pretty
carefully in the recent past and I'm pretty sure the locks match the unlocks
in the aforementioned versions. So I'm guessing they were dropped recently
by accident.
Regards,
Bob Peterson
More information about the Cluster-devel
mailing list