Merge branch 'for-3.1' of git://linux-nfs.org/~bfields/linux
* 'for-3.1' of git://linux-nfs.org/~bfields/linux: nfsd: don't break lease on CLAIM_DELEGATE_CUR locks: rename lock-manager ops nfsd4: update nfsv4.1 implementation notes nfsd: turn on reply cache for NFSv4 nfsd4: call nfsd4_release_compoundargs from pc_release nfsd41: Deny new lock before RECLAIM_COMPLETE done fs: locks: remove init_once nfsd41: check the size of request nfsd41: error out when client sets maxreq_sz or maxresp_sz too small nfsd4: fix file leak on open_downgrade nfsd4: remember to put RW access on stateid destruction NFSD: Added TEST_STATEID operation NFSD: added FREE_STATEID operation svcrpc: fix list-corrupting race on nfsd shutdown rpc: allow autoloading of gss mechanisms svcauth_unix.c: quiet sparse noise svcsock.c: include sunrpc.h to quiet sparse noise nfsd: Remove deprecated nfsctl system call and related code. NFSD: allow OP_DESTROY_CLIENTID to be only op in COMPOUND Fix up trivial conflicts in Documentation/feature-removal-schedule.txt
This commit is contained in:
@@ -744,6 +744,13 @@ static struct pf_desc gss_kerberos_pfs[] = {
|
||||
},
|
||||
};
|
||||
|
||||
MODULE_ALIAS("rpc-auth-gss-krb5");
|
||||
MODULE_ALIAS("rpc-auth-gss-krb5i");
|
||||
MODULE_ALIAS("rpc-auth-gss-krb5p");
|
||||
MODULE_ALIAS("rpc-auth-gss-390003");
|
||||
MODULE_ALIAS("rpc-auth-gss-390004");
|
||||
MODULE_ALIAS("rpc-auth-gss-390005");
|
||||
|
||||
static struct gss_api_mech gss_kerberos_mech = {
|
||||
.gm_name = "krb5",
|
||||
.gm_owner = THIS_MODULE,
|
||||
|
@@ -141,7 +141,7 @@ gss_mech_get(struct gss_api_mech *gm)
|
||||
EXPORT_SYMBOL_GPL(gss_mech_get);
|
||||
|
||||
struct gss_api_mech *
|
||||
gss_mech_get_by_name(const char *name)
|
||||
_gss_mech_get_by_name(const char *name)
|
||||
{
|
||||
struct gss_api_mech *pos, *gm = NULL;
|
||||
|
||||
@@ -158,6 +158,17 @@ gss_mech_get_by_name(const char *name)
|
||||
|
||||
}
|
||||
|
||||
struct gss_api_mech * gss_mech_get_by_name(const char *name)
|
||||
{
|
||||
struct gss_api_mech *gm = NULL;
|
||||
|
||||
gm = _gss_mech_get_by_name(name);
|
||||
if (!gm) {
|
||||
request_module("rpc-auth-gss-%s", name);
|
||||
gm = _gss_mech_get_by_name(name);
|
||||
}
|
||||
return gm;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(gss_mech_get_by_name);
|
||||
|
||||
struct gss_api_mech *
|
||||
@@ -194,10 +205,9 @@ mech_supports_pseudoflavor(struct gss_api_mech *gm, u32 pseudoflavor)
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct gss_api_mech *
|
||||
gss_mech_get_by_pseudoflavor(u32 pseudoflavor)
|
||||
struct gss_api_mech *_gss_mech_get_by_pseudoflavor(u32 pseudoflavor)
|
||||
{
|
||||
struct gss_api_mech *pos, *gm = NULL;
|
||||
struct gss_api_mech *gm = NULL, *pos;
|
||||
|
||||
spin_lock(®istered_mechs_lock);
|
||||
list_for_each_entry(pos, ®istered_mechs, gm_list) {
|
||||
@@ -213,6 +223,20 @@ gss_mech_get_by_pseudoflavor(u32 pseudoflavor)
|
||||
return gm;
|
||||
}
|
||||
|
||||
struct gss_api_mech *
|
||||
gss_mech_get_by_pseudoflavor(u32 pseudoflavor)
|
||||
{
|
||||
struct gss_api_mech *gm;
|
||||
|
||||
gm = _gss_mech_get_by_pseudoflavor(pseudoflavor);
|
||||
|
||||
if (!gm) {
|
||||
request_module("rpc-auth-gss-%u", pseudoflavor);
|
||||
gm = _gss_mech_get_by_pseudoflavor(pseudoflavor);
|
||||
}
|
||||
return gm;
|
||||
}
|
||||
|
||||
EXPORT_SYMBOL_GPL(gss_mech_get_by_pseudoflavor);
|
||||
|
||||
int gss_mech_list_pseudoflavors(rpc_authflavor_t *array_ptr)
|
||||
|
@@ -902,12 +902,13 @@ void svc_delete_xprt(struct svc_xprt *xprt)
|
||||
if (!test_and_set_bit(XPT_DETACHED, &xprt->xpt_flags))
|
||||
list_del_init(&xprt->xpt_list);
|
||||
/*
|
||||
* We used to delete the transport from whichever list
|
||||
* it's sk_xprt.xpt_ready node was on, but we don't actually
|
||||
* need to. This is because the only time we're called
|
||||
* while still attached to a queue, the queue itself
|
||||
* is about to be destroyed (in svc_destroy).
|
||||
* The only time we're called while xpt_ready is still on a list
|
||||
* is while the list itself is about to be destroyed (in
|
||||
* svc_destroy). BUT svc_xprt_enqueue could still be attempting
|
||||
* to add new entries to the sp_sockets list, so we can't leave
|
||||
* a freed xprt on it.
|
||||
*/
|
||||
list_del_init(&xprt->xpt_ready);
|
||||
if (test_bit(XPT_TEMP, &xprt->xpt_flags))
|
||||
serv->sv_tmpcnt--;
|
||||
spin_unlock_bh(&serv->sv_lock);
|
||||
|
@@ -30,12 +30,10 @@
|
||||
|
||||
struct unix_domain {
|
||||
struct auth_domain h;
|
||||
#ifdef CONFIG_NFSD_DEPRECATED
|
||||
int addr_changes;
|
||||
#endif /* CONFIG_NFSD_DEPRECATED */
|
||||
/* other stuff later */
|
||||
};
|
||||
|
||||
extern struct auth_ops svcauth_null;
|
||||
extern struct auth_ops svcauth_unix;
|
||||
|
||||
static void svcauth_unix_domain_release(struct auth_domain *dom)
|
||||
@@ -74,9 +72,6 @@ struct auth_domain *unix_domain_find(char *name)
|
||||
return NULL;
|
||||
}
|
||||
new->h.flavour = &svcauth_unix;
|
||||
#ifdef CONFIG_NFSD_DEPRECATED
|
||||
new->addr_changes = 0;
|
||||
#endif /* CONFIG_NFSD_DEPRECATED */
|
||||
rv = auth_domain_lookup(name, &new->h);
|
||||
}
|
||||
}
|
||||
@@ -95,9 +90,6 @@ struct ip_map {
|
||||
char m_class[8]; /* e.g. "nfsd" */
|
||||
struct in6_addr m_addr;
|
||||
struct unix_domain *m_client;
|
||||
#ifdef CONFIG_NFSD_DEPRECATED
|
||||
int m_add_change;
|
||||
#endif /* CONFIG_NFSD_DEPRECATED */
|
||||
};
|
||||
|
||||
static void ip_map_put(struct kref *kref)
|
||||
@@ -151,9 +143,6 @@ static void update(struct cache_head *cnew, struct cache_head *citem)
|
||||
|
||||
kref_get(&item->m_client->h.ref);
|
||||
new->m_client = item->m_client;
|
||||
#ifdef CONFIG_NFSD_DEPRECATED
|
||||
new->m_add_change = item->m_add_change;
|
||||
#endif /* CONFIG_NFSD_DEPRECATED */
|
||||
}
|
||||
static struct cache_head *ip_map_alloc(void)
|
||||
{
|
||||
@@ -338,16 +327,6 @@ static int __ip_map_update(struct cache_detail *cd, struct ip_map *ipm,
|
||||
ip.h.flags = 0;
|
||||
if (!udom)
|
||||
set_bit(CACHE_NEGATIVE, &ip.h.flags);
|
||||
#ifdef CONFIG_NFSD_DEPRECATED
|
||||
else {
|
||||
ip.m_add_change = udom->addr_changes;
|
||||
/* if this is from the legacy set_client system call,
|
||||
* we need m_add_change to be one higher
|
||||
*/
|
||||
if (expiry == NEVER)
|
||||
ip.m_add_change++;
|
||||
}
|
||||
#endif /* CONFIG_NFSD_DEPRECATED */
|
||||
ip.h.expiry_time = expiry;
|
||||
ch = sunrpc_cache_update(cd, &ip.h, &ipm->h,
|
||||
hash_str(ipm->m_class, IP_HASHBITS) ^
|
||||
@@ -367,62 +346,6 @@ static inline int ip_map_update(struct net *net, struct ip_map *ipm,
|
||||
return __ip_map_update(sn->ip_map_cache, ipm, udom, expiry);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_NFSD_DEPRECATED
|
||||
int auth_unix_add_addr(struct net *net, struct in6_addr *addr, struct auth_domain *dom)
|
||||
{
|
||||
struct unix_domain *udom;
|
||||
struct ip_map *ipmp;
|
||||
|
||||
if (dom->flavour != &svcauth_unix)
|
||||
return -EINVAL;
|
||||
udom = container_of(dom, struct unix_domain, h);
|
||||
ipmp = ip_map_lookup(net, "nfsd", addr);
|
||||
|
||||
if (ipmp)
|
||||
return ip_map_update(net, ipmp, udom, NEVER);
|
||||
else
|
||||
return -ENOMEM;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(auth_unix_add_addr);
|
||||
|
||||
int auth_unix_forget_old(struct auth_domain *dom)
|
||||
{
|
||||
struct unix_domain *udom;
|
||||
|
||||
if (dom->flavour != &svcauth_unix)
|
||||
return -EINVAL;
|
||||
udom = container_of(dom, struct unix_domain, h);
|
||||
udom->addr_changes++;
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(auth_unix_forget_old);
|
||||
|
||||
struct auth_domain *auth_unix_lookup(struct net *net, struct in6_addr *addr)
|
||||
{
|
||||
struct ip_map *ipm;
|
||||
struct auth_domain *rv;
|
||||
struct sunrpc_net *sn;
|
||||
|
||||
sn = net_generic(net, sunrpc_net_id);
|
||||
ipm = ip_map_lookup(net, "nfsd", addr);
|
||||
|
||||
if (!ipm)
|
||||
return NULL;
|
||||
if (cache_check(sn->ip_map_cache, &ipm->h, NULL))
|
||||
return NULL;
|
||||
|
||||
if ((ipm->m_client->addr_changes - ipm->m_add_change) >0) {
|
||||
sunrpc_invalidate(&ipm->h, sn->ip_map_cache);
|
||||
rv = NULL;
|
||||
} else {
|
||||
rv = &ipm->m_client->h;
|
||||
kref_get(&rv->ref);
|
||||
}
|
||||
cache_put(&ipm->h, sn->ip_map_cache);
|
||||
return rv;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(auth_unix_lookup);
|
||||
#endif /* CONFIG_NFSD_DEPRECATED */
|
||||
|
||||
void svcauth_unix_purge(void)
|
||||
{
|
||||
|
@@ -51,6 +51,8 @@
|
||||
#include <linux/sunrpc/stats.h>
|
||||
#include <linux/sunrpc/xprt.h>
|
||||
|
||||
#include "sunrpc.h"
|
||||
|
||||
#define RPCDBG_FACILITY RPCDBG_SVCXPRT
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user