Upgrade to 4.4.50-rt62
[kvmfornfv.git] / kernel / net / sunrpc / svc.c
index cc98528..c5b0cb4 100644 (file)
@@ -1188,11 +1188,17 @@ svc_process_common(struct svc_rqst *rqstp, struct kvec *argv, struct kvec *resv)
                *statp = procp->pc_func(rqstp, rqstp->rq_argp, rqstp->rq_resp);
 
                /* Encode reply */
-               if (test_bit(RQ_DROPME, &rqstp->rq_flags)) {
+               if (*statp == rpc_drop_reply ||
+                   test_bit(RQ_DROPME, &rqstp->rq_flags)) {
                        if (procp->pc_release)
                                procp->pc_release(rqstp, NULL, rqstp->rq_resp);
                        goto dropit;
                }
+               if (*statp == rpc_autherr_badcred) {
+                       if (procp->pc_release)
+                               procp->pc_release(rqstp, NULL, rqstp->rq_resp);
+                       goto err_bad_auth;
+               }
                if (*statp == rpc_success &&
                    (xdr = procp->pc_encode) &&
                    !xdr(rqstp, resv->iov_base+resv->iov_len, rqstp->rq_resp)) {