lkml.org 
[lkml]   [2019]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.9 105/118] nfsd: fix wrong check in write_v4_end_grace()
    Date
    4.9-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Yihao Wu <wuyihao@linux.alibaba.com>

    commit dd838821f0a29781b185cd8fb8e48d5c177bd838 upstream.

    Commit 62a063b8e7d1 "nfsd4: fix crash on writing v4_end_grace before
    nfsd startup" is trying to fix a NULL dereference issue, but it
    mistakenly checks if the nfsd server is started. So fix it.

    Fixes: 62a063b8e7d1 "nfsd4: fix crash on writing v4_end_grace before nfsd startup"
    Cc: stable@vger.kernel.org
    Reviewed-by: Joseph Qi <joseph.qi@linux.alibaba.com>
    Signed-off-by: Yihao Wu <wuyihao@linux.alibaba.com>
    Signed-off-by: J. Bruce Fields <bfields@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    fs/nfsd/nfsctl.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    --- a/fs/nfsd/nfsctl.c
    +++ b/fs/nfsd/nfsctl.c
    @@ -1103,7 +1103,7 @@ static ssize_t write_v4_end_grace(struct
    case 'Y':
    case 'y':
    case '1':
    - if (nn->nfsd_serv)
    + if (!nn->nfsd_serv)
    return -EBUSY;
    nfsd4_end_grace(nn);
    break;

    \
     
     \ /
      Last update: 2019-03-22 14:00    [W:3.557 / U:0.032 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site