[HARDY 1/2 ] SRU: Bug#253004 nfsd4: probe callback channel only once
Stefan Bader
stefan.bader at canonical.com
Tue Jun 2 18:45:27 UTC 2009
Manoj Iyer wrote:
> SRU JUSTIFICATION:
>
> IMPACT: Oops in sunrpc:rpc_shutdown_client
> Fix: likely related to: #212485 kernel bug rpc nfs client. Backported
> patch to Hardy.
> TEST: Test kernel in http://people.ubuntu.com/~manjo/lp253004-hardy/ was
> tested by community and reported to work.
>
>
> The following changes since commit
> 7758896776e7991a8fe5dc62d83fae68648fdd7d:
> Brad Figg (1):
> UBUNTU: [Hardy SRU][SAUCE]Add information to recognize Toshiba
> Satellite Pro M10 Alps Touchpad
>
> are available in the git repository at:
>
> git://kernel.ubuntu.com/manjo/ubuntu-hardy.git lp253004
>
> J. Bruce Fields (2):
> nfsd: move callback rpc_client creation into separate thread
> nfsd4: probe callback channel only once
>
> fs/nfsd/nfs4callback.c | 80
> ++++++++++++++++++++++++-----------------------
> fs/nfsd/nfs4state.c | 3 +-
> 2 files changed, 42 insertions(+), 41 deletions(-)
>
>>From 3011a223e977fb48696d246c2933a1fc2827dbac Mon Sep 17 00:00:00 2001
> From: J. Bruce Fields <bfields at citi.umich.edu>
> Date: Thu, 22 Nov 2007 13:54:18 -0500
> Subject: [PATCH] nfsd4: probe callback channel only once
>
> Bug: 253004
> BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/253004
>
> Our callback code doesn't actually handle concurrent attempts to probe
> the callback channel. Some rethinking of the locking may be required.
> However, we can also just move the callback probing to this case. Since
> this is the only time a client is "confirmed" (and since that can only
> happen once in the lifetime of a client), this ensures we only probe
> once.
>
> Signed-off-by: J. Bruce Fields <bfields at citi.umich.edu>
> ---
> fs/nfsd/nfs4callback.c | 4 ++--
> fs/nfsd/nfs4state.c | 3 +--
> 2 files changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/fs/nfsd/nfs4callback.c b/fs/nfsd/nfs4callback.c
> index 698376b..a292640 100644
> --- a/fs/nfsd/nfs4callback.c
> +++ b/fs/nfsd/nfs4callback.c
> @@ -370,8 +370,6 @@ static int do_probe_callback(void *data)
> .flags = (RPC_CLNT_CREATE_NOPING),
> };
>
> - if (atomic_read(&cb->cb_set))
> - return;
> struct rpc_message msg = {
> .rpc_proc = &nfs4_cb_procedures[NFSPROC4_CLNT_CB_NULL],
> .rpc_argp = clp,
> @@ -379,6 +377,8 @@ static int do_probe_callback(void *data)
> struct rpc_clnt *client;
> int status;
>
> + BUG_ON(atomic_read(&clp->cl_callback.cb_set));
> +
> /* Initialize address */
> memset(&addr, 0, sizeof(addr));
> addr.sin_family = AF_INET;
> diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
> index 31673cd..9d81c71 100644
> --- a/fs/nfsd/nfs4state.c
> +++ b/fs/nfsd/nfs4state.c
> @@ -948,6 +948,7 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp,
> }
> move_to_confirmed(unconf);
> conf = unconf;
> + nfsd4_probe_callback(conf);
> status = nfs_ok;
> }
> } else if ((!conf || (conf && !same_verf(&conf->cl_confirm, &confirm)))
> @@ -965,8 +966,6 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp,
> status = nfserr_clid_inuse;
> }
> out:
> - if (!status)
> - nfsd4_probe_callback(conf);
> nfs4_unlock_state();
> return status;
> }
ACK and applied
--
When all other means of communication fail, try words!
More information about the kernel-team
mailing list