All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chuck Lever <cel@citi.umich.edu>
To: Olaf Kirch <okir@suse.de>
Cc: nfs@lists.sourceforge.net
Subject: Re: [PATCH] Auto-load RPC authentication kernel modules (client-side)
Date: Tue, 31 Jan 2006 11:00:48 -0500	[thread overview]
Message-ID: <43DF89B0.4070600@citi.umich.edu> (raw)
In-Reply-To: <20060131101337.GF1462@suse.de>

[-- Attachment #1: Type: text/plain, Size: 1551 bytes --]

i like it.  i suppose i should add similar logic to load transport 
modules automatically.

Olaf Kirch wrote:
> Summary: Auto-load RPC authentication kernel modules (client-side)
> 
> This patch adds a request_module call to rpcauth_create which will try
> to auto-load the kernel module for the requested authentication flavor.
> For kernels with modular sunrpc, this reduces the admin overhead for
> the user.
> 
> Signed-off-by: Olaf Kirch <okir@suse.de>
> 
>  net/sunrpc/auth.c |   16 ++++++++++++++--
>  1 files changed, 14 insertions(+), 2 deletions(-)
> 
> Index: build/net/sunrpc/auth.c
> ===================================================================
> --- build.orig/net/sunrpc/auth.c
> +++ build/net/sunrpc/auth.c
> @@ -64,14 +64,26 @@ rpcauth_create(rpc_authflavor_t pseudofl
>  	struct rpc_authops	*ops;
>  	u32			flavor = pseudoflavor_to_flavor(pseudoflavor);
>  
> -	if (flavor >= RPC_AUTH_MAXFLAVOR || !(ops = auth_flavors[flavor]))
> -		return ERR_PTR(-EINVAL);
> +	auth = ERR_PTR(-EINVAL);
> +	if (flavor >= RPC_AUTH_MAXFLAVOR)
> +		goto out;
> +
> +	/* FIXME - auth_flavors[] really needs an rw lock,
> +	 * and module refcounting. */
> +#ifdef CONFIG_KMOD
> +	if ((ops = auth_flavors[flavor]) == NULL)
> +		request_module("rpc-auth-%u", flavor);
> +#endif
> +	if ((ops = auth_flavors[flavor]) == NULL)
> +		goto out;
>  	auth = ops->create(clnt, pseudoflavor);
>  	if (IS_ERR(auth))
>  		return auth;
>  	if (clnt->cl_auth)
>  		rpcauth_destroy(clnt->cl_auth);
>  	clnt->cl_auth = auth;
> +
> +out:
>  	return auth;
>  }
>  


[-- Attachment #2: cel.vcf --]
[-- Type: text/x-vcard, Size: 451 bytes --]

begin:vcard
fn:Chuck Lever
n:Lever;Charles
org:Network Appliance, Incorporated;Open Source NFS Client Development
adr:535 West William Street, Suite 3100;;Center for Information Technology Integration;Ann Arbor;MI;48103-4943;USA
email;internet:cel@citi.umich.edu
title:Member of Technical Staff
tel;work:+1 734 763 4415
tel;fax:+1 734 763 4434
tel;home:+1 734 668 1089
x-mozilla-html:FALSE
url:http://troy.citi.umich.edu/u/cel/
version:2.1
end:vcard


      parent reply	other threads:[~2006-01-31 16:00 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-31 10:13 [PATCH] Auto-load RPC authentication kernel modules (client-side) Olaf Kirch
2006-01-31 13:04 ` Trond Myklebust
2006-01-31 16:00 ` Chuck Lever [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=43DF89B0.4070600@citi.umich.edu \
    --to=cel@citi.umich.edu \
    --cc=nfs@lists.sourceforge.net \
    --cc=okir@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.