lkml.org 
[lkml]   [2019]   [Jun]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.1 69/85] Revert "lockd: Show pid of lockd for remote locks"
    Date
    From: Benjamin Coddington <bcodding@redhat.com>

    commit 141731d15d6eb2fd9aaefbf9b935ce86ae243074 upstream.

    This reverts most of commit b8eee0e90f97 ("lockd: Show pid of lockd for
    remote locks"), which caused remote locks to not be differentiated between
    remote processes for NLM.

    We retain the fixup for setting the client's fl_pid to a negative value.

    Fixes: b8eee0e90f97 ("lockd: Show pid of lockd for remote locks")
    Cc: stable@vger.kernel.org

    Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
    Reviewed-by: XueWei Zhang <xueweiz@google.com>
    Signed-off-by: J. Bruce Fields <bfields@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    fs/lockd/xdr.c | 4 ++--
    fs/lockd/xdr4.c | 4 ++--
    2 files changed, 4 insertions(+), 4 deletions(-)

    --- a/fs/lockd/xdr.c
    +++ b/fs/lockd/xdr.c
    @@ -127,7 +127,7 @@ nlm_decode_lock(__be32 *p, struct nlm_lo

    locks_init_lock(fl);
    fl->fl_owner = current->files;
    - fl->fl_pid = current->tgid;
    + fl->fl_pid = (pid_t)lock->svid;
    fl->fl_flags = FL_POSIX;
    fl->fl_type = F_RDLCK; /* as good as anything else */
    start = ntohl(*p++);
    @@ -269,7 +269,7 @@ nlmsvc_decode_shareargs(struct svc_rqst
    memset(lock, 0, sizeof(*lock));
    locks_init_lock(&lock->fl);
    lock->svid = ~(u32) 0;
    - lock->fl.fl_pid = current->tgid;
    + lock->fl.fl_pid = (pid_t)lock->svid;

    if (!(p = nlm_decode_cookie(p, &argp->cookie))
    || !(p = xdr_decode_string_inplace(p, &lock->caller,
    --- a/fs/lockd/xdr4.c
    +++ b/fs/lockd/xdr4.c
    @@ -119,7 +119,7 @@ nlm4_decode_lock(__be32 *p, struct nlm_l

    locks_init_lock(fl);
    fl->fl_owner = current->files;
    - fl->fl_pid = current->tgid;
    + fl->fl_pid = (pid_t)lock->svid;
    fl->fl_flags = FL_POSIX;
    fl->fl_type = F_RDLCK; /* as good as anything else */
    p = xdr_decode_hyper(p, &start);
    @@ -266,7 +266,7 @@ nlm4svc_decode_shareargs(struct svc_rqst
    memset(lock, 0, sizeof(*lock));
    locks_init_lock(&lock->fl);
    lock->svid = ~(u32) 0;
    - lock->fl.fl_pid = current->tgid;
    + lock->fl.fl_pid = (pid_t)lock->svid;

    if (!(p = nlm4_decode_cookie(p, &argp->cookie))
    || !(p = xdr_decode_string_inplace(p, &lock->caller,

    \
     
     \ /
      Last update: 2019-06-07 17:51    [W:4.046 / U:0.224 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site