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 receive_request() lvb copying [6/54]
    From
    Date
    >From f1d7674362afc47d0125e68dc7187e81f276a235 Mon Sep 17 00:00:00 2001
    From: David Teigland <teigland@redhat.com>
    Date: Wed, 13 Dec 2006 10:39:20 -0600
    Subject: [PATCH] [DLM] fix receive_request() lvb copying

    LVB's are not sent as part of new requests, but the code receiving the
    request was copying data into the lvb anyway. The space in the message
    where it mistakenly thought the lvb lived actually contained the resource
    name, so it wound up incorrectly copying this name data into the lvb. Fix
    is to just create the lvb, not copy junk into it.

    Signed-off-by: David Teigland <teigland@redhat.com>
    Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>

    diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c
    index cdf2cb9..d8e919b 100644
    --- a/fs/dlm/lock.c
    +++ b/fs/dlm/lock.c
    @@ -2430,8 +2430,12 @@ static int receive_request_args(struct dlm_ls *ls, struct dlm_lkb *lkb,

    DLM_ASSERT(is_master_copy(lkb), dlm_print_lkb(lkb););

    - if (receive_lvb(ls, lkb, ms))
    - return -ENOMEM;
    + if (lkb->lkb_exflags & DLM_LKF_VALBLK) {
    + /* lkb was just created so there won't be an lvb yet */
    + lkb->lkb_lvbptr = allocate_lvb(ls);
    + if (!lkb->lkb_lvbptr)
    + return -ENOMEM;
    + }

    return 0;
    }
    --
    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:09    [W:0.025 / U:0.916 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site