lkml.org 
[lkml]   [2015]   [May]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.0 198/220] nfsd4: disallow ALLOCATE with special stateids
    Date
    4.0-stable review patch.  If anyone has any objections, please let me know.

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

    From: "J. Bruce Fields" <bfields@redhat.com>

    commit 5ba4a25ab7b13be528b23f85182f4d09cf7f71ad upstream.

    vfs_fallocate will hit a NULL dereference if the client tries an
    ALLOCATE or DEALLOCATE with a special stateid. Fix that. (We also
    depend on the open to have broken any conflicting leases or delegations
    for us.)

    (If it turns out we need to allow special stateid's then we could do a
    temporary open here in the special-stateid case, as we do for read and
    write. For now I'm assuming it's not necessary.)

    Fixes: 95d871f03cae "nfsd: Add ALLOCATE support"
    Cc: Anna Schumaker <Anna.Schumaker@Netapp.com>
    Signed-off-by: J. Bruce Fields <bfields@redhat.com>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    fs/nfsd/nfs4proc.c | 2 ++
    1 file changed, 2 insertions(+)

    --- a/fs/nfsd/nfs4proc.c
    +++ b/fs/nfsd/nfs4proc.c
    @@ -1030,6 +1030,8 @@ nfsd4_fallocate(struct svc_rqst *rqstp,
    dprintk("NFSD: nfsd4_fallocate: couldn't process stateid!\n");
    return status;
    }
    + if (!file)
    + return nfserr_bad_stateid;

    status = nfsd4_vfs_fallocate(rqstp, &cstate->current_fh, file,
    fallocate->falloc_offset,



    \
     
     \ /
      Last update: 2015-05-02 23:41    [W:2.786 / U:0.036 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site