Re: [PATCH 0/4] Add support for new RPCSEC_GSS upcall mechanism for nfsd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 12, 2012 at 06:05:17PM -0400, Simo Sorce wrote:
> On Thu, 2012-07-12 at 08:39 -0400, J. Bruce Fields wrote:
> > And this is reproduceable after applying the first patch
> > ("conditionally
> > return endtime...") but not before.  The patch seems obviously
> > innocent,
> > but maybe my eyes are playing tricks on me.
> > 
> missing braces around the if statement where I inserted the if (endtime)
> contion, causing instead to always kfree(ctx)
> 
> Sorry about that, it completely escaped my review of it multiple times
> over.

I also looked straight at it without seeing it.  It's tough to make my
eyes not trust the indentation!

--b.

diff --git a/net/sunrpc/auth_gss/gss_krb5_mech.c b/net/sunrpc/auth_gss/gss_krb5_mech.c
index a32bb4f..3bc4a23 100644
--- a/net/sunrpc/auth_gss/gss_krb5_mech.c
+++ b/net/sunrpc/auth_gss/gss_krb5_mech.c
@@ -695,11 +695,11 @@ gss_import_sec_context_kerberos(const void *p, size_t len,
 	else
 		ret = gss_import_v2_context(p, end, ctx, gfp_mask);
 
-	if (ret == 0)
+	if (ret == 0) {
 		ctx_id->internal_ctx_id = ctx;
 		if (endtime)
 			*endtime = ctx->endtime;
-	else
+	} else
 		kfree(ctx);
 
 	dprintk("RPC:       %s: returning %d\n", __func__, ret);
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux