29 Oct, 2008

3 commits

  • We have to be careful when we try to unhash the credential in
    put_rpccred(), because we're not holding the credcache lock, so the call to
    rpcauth_unhash_cred() may fail if someone else has looked the cred up, and
    obtained a reference to it.

    Signed-off-by: Trond Myklebust

    Trond Myklebust
     
  • We need to make sure that we don't remove creds from the cred_unused list
    if they are still under the moratorium, or else they will never get
    garbage collected.

    Signed-off-by: Trond Myklebust

    Trond Myklebust
     
  • If the server sends us an RST error while we're in the TCP_ESTABLISHED
    state, then that will not result in a state change, and so the RPC client
    ends up hanging forever (see
    http://bugzilla.kernel.org/show_bug.cgi?id=11154)

    We can intercept the reset by setting up an sk->sk_error_report callback,
    which will then allow us to initiate a proper shutdown and retry...

    We also make sure that if the send request receives an ECONNRESET, then we
    shutdown too...

    Signed-off-by: Trond Myklebust

    Trond Myklebust
     

17 Oct, 2008

2 commits


16 Oct, 2008

1 commit


15 Oct, 2008

1 commit

  • * 'for-2.6.28' of git://linux-nfs.org/~bfields/linux: (59 commits)
    svcrdma: Fix IRD/ORD polarity
    svcrdma: Update svc_rdma_send_error to use DMA LKEY
    svcrdma: Modify the RPC reply path to use FRMR when available
    svcrdma: Modify the RPC recv path to use FRMR when available
    svcrdma: Add support to svc_rdma_send to handle chained WR
    svcrdma: Modify post recv path to use local dma key
    svcrdma: Add a service to register a Fast Reg MR with the device
    svcrdma: Query device for Fast Reg support during connection setup
    svcrdma: Add FRMR get/put services
    NLM: Remove unused argument from svc_addsock() function
    NLM: Remove "proto" argument from lockd_up()
    NLM: Always start both UDP and TCP listeners
    lockd: Remove unused fields in the nlm_reboot structure
    lockd: Add helper to sanity check incoming NOTIFY requests
    lockd: change nlmclnt_grant() to take a "struct sockaddr *"
    lockd: Adjust nlmsvc_lookup_host() to accomodate AF_INET6 addresses
    lockd: Adjust nlmclnt_lookup_host() signature to accomodate non-AF_INET
    lockd: Support non-AF_INET addresses in nlm_lookup_host()
    NLM: Convert nlm_lookup_host() to use a single argument
    svcrdma: Add Fast Reg MR Data Types
    ...

    Linus Torvalds
     

14 Oct, 2008

1 commit

  • Clean up the various different email addresses of mine listed in the code
    to a single current and valid address. As Dave says his network merges
    for 2.6.28 are now done this seems a good point to send them in where
    they won't risk disrupting real changes.

    Signed-off-by: Alan Cox
    Signed-off-by: David S. Miller

    Alan Cox
     

11 Oct, 2008

16 commits


09 Oct, 2008

1 commit


08 Oct, 2008

4 commits

  • On a system with nfs mounts, if a task unshares its mount namespace,
    a oops can occur when the system is rebooted if the task is the last
    to unreference the nfs mount. It will try to create a rpc request
    using utsname() which has been invalidated by free_nsproxy().

    The patch fixes the issue by using the global init_utsname() which is
    always valid. the capability of identifying rpc clients per uts namespace
    stills needs some extra work so this should not be a problem.

    BUG: unable to handle kernel NULL pointer dereference at 00000004
    IP: [] rpc_create+0x332/0x42f
    Oops: 0000 [#1] DEBUG_PAGEALLOC

    Pid: 1857, comm: uts-oops Not tainted (2.6.27-rc5-00319-g7686ad5 #4)
    EIP: 0060:[] EFLAGS: 00210287 CPU: 0
    EIP is at rpc_create+0x332/0x42f
    EAX: 00000000 EBX: df26adf0 ECX: c0251887 EDX: 00000001
    ESI: df26ae58 EDI: c02f293c EBP: dda0fc9c ESP: dda0fc2c
    DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068
    Process uts-oops (pid: 1857, ti=dda0e000 task=dd9a0778 task.ti=dda0e000)
    Stack: c0104532 dda0fffc dda0fcac dda0e000 dda0e000 dd93b7f0 00000009 c02f2880
    df26aefc dda0fc68 c01096b7 00000000 c0266ee0 c039a070 c039a070 dda0fc74
    c012ca67 c039a064 dda0fc8c c012cb20 c03daf74 00000011 00000000 c0275c90
    Call Trace:
    [] ? dump_trace+0xc2/0xe2
    [] ? save_stack_trace+0x1c/0x3a
    [] ? save_trace+0x37/0x8c
    [] ? add_lock_to_list+0x64/0x96
    [] ? rpcb_register_call+0x62/0xbb
    [] ? rpcb_register+0xab/0xb3
    [] ? svc_register+0xb4/0x128
    [] ? svc_destroy+0xec/0x103
    [] ? svc_exit_thread+0x87/0x8d
    [] ? lockd_down+0x61/0x81
    [] ? nlmclnt_done+0xd/0xf
    [] ? nfs_destroy_server+0x14/0x16
    [] ? nfs_free_server+0x4c/0xaa
    [] ? nfs_kill_super+0x23/0x27
    [] ? deactivate_super+0x3f/0x51
    [] ? mntput_no_expire+0x95/0xb4
    [] ? release_mounts+0x6b/0x7a
    [] ? __put_mnt_ns+0x62/0x70
    [] ? free_nsproxy+0x25/0x80
    [] ? switch_task_namespaces+0x3e/0x43
    [] ? exit_task_namespaces+0xa/0xc
    [] ? do_exit+0x4fd/0x666
    [] ? do_group_exit+0x5d/0x83
    [] ? get_signal_to_deliver+0x2c8/0x2e0
    [] ? do_notify_resume+0x69/0x700
    [] ? do_sigaction+0x134/0x145
    [] ? hrtimer_nanosleep+0x8f/0xce
    [] ? hrtimer_wakeup+0x0/0x1c
    [] ? work_notifysig+0x13/0x1b
    =======================
    Code: 70 20 68 cb c1 2c c0 e8 75 4e 01 00 8b 83 ac 00 00 00 59 3d 00 f0 ff ff 5f 77 63 eb 57 a1 00 80 2d c0 8b 80 a8 02 00 00 8d 73 68 40 04 83 c0 45 e8 41 46 f7 ff ba 20 00 00 00 83 f8 21 0f 4c
    EIP: [] rpc_create+0x332/0x42f SS:ESP 0068:dda0fc2c

    Signed-off-by: Cedric Le Goater
    Cc: Chuck Lever
    Cc: Trond Myklebust
    Cc: "Eric W. Biederman"
    Cc: "Serge E. Hallyn"
    Signed-off-by: Andrew Morton
    Signed-off-by: J. Bruce Fields
    Signed-off-by: Trond Myklebust

    Cedric Le Goater
     
  • Signed-off-by: Trond Myklebust

    Trond Myklebust
     
  • Despite the fact that cloned rpc clients won't have the cl_autobind flag
    set, they may still find themselves calling rpcb_getport_async(). For this
    to happen, it suffices for a _parent_ rpc_clnt to use autobinding, in which
    case any clone may find itself triggering the !xprt_bound() case in
    call_bind().

    The correct fix for this is to walk back up the tree of cloned rpc clients,
    in order to find the parent that 'owns' the transport, either because it
    has clnt->cl_autobind set, or because it originally created the
    transport...

    Signed-off-by: Trond Myklebust

    Trond Myklebust
     
  • Basically, try_module_get here are pretty useless. Any other module using
    this API will pin sunrpc in memory due using exported symbols.

    Signed-off-by: Denis V. Lunev
    Signed-off-by: Trond Myklebust

    Denis V. Lunev
     

07 Oct, 2008

9 commits


05 Oct, 2008

1 commit


30 Sep, 2008

1 commit

  • since commit ff7d9756b501744540be65e172d27ee321d86103
    "nfsd: use static memory for callback program and stats"
    do_probe_callback uses a static callback program
    (NFS4_CALLBACK) rather than the one set in clp->cl_callback.cb_prog
    as passed in by the client in setclientid (4.0)
    or create_session (4.1).

    This patches introduces rpc_create_args.prognumber that allows
    overriding program->number when creating rpc_clnt.

    Signed-off-by: Benny Halevy
    Signed-off-by: J. Bruce Fields

    Benny Halevy