lkml.org 
[lkml]   [2007]   [Feb]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Subject[DLM] Fix spin lock already unlocked bug [13/54]
    From
    Date
    >From c239b99d90a2b667505cf5b397e8506be5dc3e9c Mon Sep 17 00:00:00 2001
    From: Patrick Caulfield <pcaulfie@redhat.com>
    Date: Tue, 2 Jan 2007 17:08:54 +0000
    Subject: [PATCH] [DLM] Fix spin lock already unlocked bug

    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

    Signed-Off-By: Patrick Caulfield <pcaulfie@redhat.com>
    Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>

    diff --git a/fs/dlm/lowcomms-tcp.c b/fs/dlm/lowcomms-tcp.c
    index 18b91c6..ce5e7cd 100644
    --- a/fs/dlm/lowcomms-tcp.c
    +++ b/fs/dlm/lowcomms-tcp.c
    @@ -709,6 +709,7 @@ void *dlm_lowcomms_get_buffer(int nodeid, int len,
    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 @@ void dlm_lowcomms_commit_buffer(void *mh)
    struct connection *con = e->con;
    int users;

    + spin_lock(&con->writequeue_lock);
    users = --e->users;
    if (users)
    goto out;
    --
    1.4.4.2


    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2007-02-05 15:15    [W:3.468 / U:0.040 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site