12 Jan, 2013

1 commit


11 Jan, 2013

1 commit

  • Fix new kernel-doc warnings in clnt.c:

    Warning(net/sunrpc/clnt.c:561): No description found for parameter 'flavor'
    Warning(net/sunrpc/clnt.c:561): Excess function parameter 'auth' description in 'rpc_clone_client_set_auth'

    Signed-off-by: Randy Dunlap
    Cc: Trond Myklebust
    Cc: "J. Bruce Fields"
    Cc: linux-nfs@vger.kernel.org
    Signed-off-by: Linus Torvalds

    Randy Dunlap
     

09 Jan, 2013

1 commit

  • If the rpc_task exits while holding the socket write lock before it has
    allocated an rpc slot, then the usual mechanism for releasing the write
    lock in xprt_release() is defeated.

    The problem occurs if the call to xprt_lock_write() initially fails, so
    that the rpc_task is put on the xprt->sending wait queue. If the task
    exits after being assigned the lock by __xprt_lock_write_func, but
    before it has retried the call to xprt_lock_and_alloc_slot(), then
    it calls xprt_release() while holding the write lock, but will
    immediately exit due to the test for task->tk_rqstp != NULL.

    Reported-by: Chris Perl
    Signed-off-by: Trond Myklebust
    Cc: stable@vger.kernel.org [>= 3.1]

    Trond Myklebust
     

05 Jan, 2013

2 commits


21 Dec, 2012

1 commit

  • Pull nfsd update from Bruce Fields:
    "Included this time:

    - more nfsd containerization work from Stanislav Kinsbursky: we're
    not quite there yet, but should be by 3.9.

    - NFSv4.1 progress: implementation of basic backchannel security
    negotiation and the mandatory BACKCHANNEL_CTL operation. See

    http://wiki.linux-nfs.org/wiki/index.php/Server_4.0_and_4.1_issues

    for remaining TODO's

    - Fixes for some bugs that could be triggered by unusual compounds.
    Our xdr code wasn't designed with v4 compounds in mind, and it
    shows. A more thorough rewrite is still a todo.

    - If you've ever seen "RPC: multiple fragments per record not
    supported" logged while using some sort of odd userland NFS client,
    that should now be fixed.

    - Further work from Jeff Layton on our mechanism for storing
    information about NFSv4 clients across reboots.

    - Further work from Bryan Schumaker on his fault-injection mechanism
    (which allows us to discard selective NFSv4 state, to excercise
    rarely-taken recovery code paths in the client.)

    - The usual mix of miscellaneous bugs and cleanup.

    Thanks to everyone who tested or contributed this cycle."

    * 'for-3.8' of git://linux-nfs.org/~bfields/linux: (111 commits)
    nfsd4: don't leave freed stateid hashed
    nfsd4: free_stateid can use the current stateid
    nfsd4: cleanup: replace rq_resused count by rq_next_page pointer
    nfsd: warn on odd reply state in nfsd_vfs_read
    nfsd4: fix oops on unusual readlike compound
    nfsd4: disable zero-copy on non-final read ops
    svcrpc: fix some printks
    NFSD: Correct the size calculation in fault_inject_write
    NFSD: Pass correct buffer size to rpc_ntop
    nfsd: pass proper net to nfsd_destroy() from NFSd kthreads
    nfsd: simplify service shutdown
    nfsd: replace boolean nfsd_up flag by users counter
    nfsd: simplify NFSv4 state init and shutdown
    nfsd: introduce helpers for generic resources init and shutdown
    nfsd: make NFSd service structure allocated per net
    nfsd: make NFSd service boot time per-net
    nfsd: per-net NFSd up flag introduced
    nfsd: move per-net startup code to separated function
    nfsd: pass net to __write_ports() and down
    nfsd: pass net to nfsd_set_nrthreads()
    ...

    Linus Torvalds
     

18 Dec, 2012

3 commits


16 Dec, 2012

2 commits


13 Dec, 2012

2 commits

  • Currently, when an RPCSEC_GSS context has expired or is non-existent
    and the users (Kerberos) credentials have also expired or are non-existent,
    the client receives the -EKEYEXPIRED error and tries to refresh the context
    forever. If an application is performing I/O, or other work against the share,
    the application hangs, and the user is not prompted to refresh/establish their
    credentials. This can result in a denial of service for other users.

    Users are expected to manage their Kerberos credential lifetimes to mitigate
    this issue.

    Move the -EKEYEXPIRED handling into the RPC layer. Try tk_cred_retry number
    of times to refresh the gss_context, and then return -EACCES to the application.

    Signed-off-by: Andy Adamson
    Signed-off-by: Trond Myklebust

    Andy Adamson
     
  • Only use the default GSSD_MIN_TIMEOUT if the gss downcall timeout is zero.
    Store the full lifetime in gc_expiry (not 3/4 of the lifetime) as subsequent
    patches will use the gc_expiry to determine buffered WRITE behavior in the
    face of expired or soon to be expired gss credentials.

    Signed-off-by: Andy Adamson
    Signed-off-by: Trond Myklebust

    Andy Adamson
     

11 Dec, 2012

2 commits


06 Dec, 2012

2 commits


04 Dec, 2012

5 commits

  • Over TCP, RPC's are preceded by a single 4-byte field telling you how
    long the rpc is (in bytes). The spec also allows you to send an RPC in
    multiple such records (the high bit of the length field is used to tell
    you whether this is the final record).

    We've survived for years without supporting this because in practice the
    clients we care about don't use it. But the userland rpc libraries do,
    and every now and then an experimental client will run into this. (Most
    recently I noticed it while trying to write a pynfs check.) And we're
    really on the wrong side of the spec here--let's fix this.

    Signed-off-by: J. Bruce Fields

    J. Bruce Fields
     
  • Keep a separate field, sk_datalen, that tracks only the data contained
    in a fragment, not including the fragment header.

    For now, this is always just max(0, sk_tcplen - 4), but after we allow
    multiple fragments sk_datalen will accumulate the total rpc data size
    while sk_tcplen only tracks progress receiving the current fragment.

    Signed-off-by: J. Bruce Fields

    J. Bruce Fields
     
  • The full reclen doesn't include the fragment header, but sk_tcplen does.
    Fix this to make it an apples-to-apples comparison.

    Signed-off-by: J. Bruce Fields

    J. Bruce Fields
     
  • Soon we want to support multiple fragments, in which case it may be
    legal for a single fragment to be smaller than 8 bytes, so we'll want to
    delay this check till we've reached the last fragment.

    Also fix an outdated comment.

    Signed-off-by: J. Bruce Fields

    J. Bruce Fields
     
  • Byte-swapping in place is always a little dubious.

    Let's instead define this field to always be big-endian, and do the
    swapping on demand where we need it.

    Signed-off-by: J. Bruce Fields

    J. Bruce Fields
     

09 Nov, 2012

1 commit

  • rpc_kill_sb() must defer calling put_net() until after the notifier
    has been called, since most (all?) of the notifier callbacks assume
    that sb->s_fs_info points to a valid net namespace. It also must not
    call put_net() if the call to rpc_fill_super was unsuccessful.

    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=48421

    Signed-off-by: Trond Myklebust
    Cc: Stanislav Kinsbursky
    Cc: stable@vger.kernel.org [>= v3.4]

    Trond Myklebust
     

08 Nov, 2012

1 commit


05 Nov, 2012

16 commits