From: "J. Bruce Fields" Fix a null deference if svc_authorise is called twice for a request, and fix the test in svcauth_register which otherwise causes initialization of the gss module to fail. Signed-off-by: J. Bruce Fields Signed-off-by: Andrew Morton --- 25-akpm/net/sunrpc/svcauth.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff -puN net/sunrpc/svcauth.c~knfsd-5-of-11-gss_svc_module_refpatch-fix2 net/sunrpc/svcauth.c --- 25/net/sunrpc/svcauth.c~knfsd-5-of-11-gss_svc_module_refpatch-fix2 2004-05-31 21:39:39.985812040 -0700 +++ 25-akpm/net/sunrpc/svcauth.c 2004-05-31 21:39:39.988811584 -0700 @@ -70,10 +70,10 @@ int svc_authorise(struct svc_rqst *rqstp rqstp->rq_authop = NULL; - if (aops) + if (aops) { rv = aops->release(rqstp); - - module_put(aops->owner); + module_put(aops->owner); + } return rv; } @@ -82,7 +82,7 @@ svc_auth_register(rpc_authflavor_t flavo { int rv = -EINVAL; spin_lock(&authtab_lock); - if (flavor < RPC_AUTH_MAXFLAVOR && authtab[flavor] != NULL) { + if (flavor < RPC_AUTH_MAXFLAVOR && authtab[flavor] == NULL) { authtab[flavor] = aops; rv = 0; } _