]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - fs/nfs/callback_xdr.c
Merge tag 'amd-drm-fixes-5.6-2020-02-19' of git://people.freedesktop.org/~agd5f/linux...
[linux.git] / fs / nfs / callback_xdr.c
index 03a20f5716c7a39b23ac97f218f6d1ea9bbff689..79ff172eb1c81ac0bc2b89740157b6163ca6aa8b 100644 (file)
@@ -18,6 +18,7 @@
 #include "callback.h"
 #include "internal.h"
 #include "nfs4session.h"
+#include "nfs4trace.h"
 
 #define CB_OP_TAGLEN_MAXSZ             (512)
 #define CB_OP_HDR_RES_MAXSZ            (2 * 4) // opcode, status
@@ -946,9 +947,13 @@ static __be32 nfs4_callback_compound(struct svc_rqst *rqstp)
 
        if (hdr_arg.minorversion == 0) {
                cps.clp = nfs4_find_client_ident(SVC_NET(rqstp), hdr_arg.cb_ident);
-               if (!cps.clp || !check_gss_callback_principal(cps.clp, rqstp)) {
-                       if (cps.clp)
-                               nfs_put_client(cps.clp);
+               if (!cps.clp) {
+                       trace_nfs_cb_no_clp(rqstp->rq_xid, hdr_arg.cb_ident);
+                       goto out_invalidcred;
+               }
+               if (!check_gss_callback_principal(cps.clp, rqstp)) {
+                       trace_nfs_cb_badprinc(rqstp->rq_xid, hdr_arg.cb_ident);
+                       nfs_put_client(cps.clp);
                        goto out_invalidcred;
                }
        }