From patchwork Thu Jul 12 22:42:07 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "J. Bruce Fields" X-Patchwork-Id: 1191381 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 63BE240D0E for ; Thu, 12 Jul 2012 22:42:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161994Ab2GLWmT (ORCPT ); Thu, 12 Jul 2012 18:42:19 -0400 Received: from fieldses.org ([174.143.236.118]:53160 "EHLO fieldses.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1162000Ab2GLWmH (ORCPT ); Thu, 12 Jul 2012 18:42:07 -0400 Received: from bfields by fieldses.org with local (Exim 4.72) (envelope-from ) id 1SpS5H-0006hA-9c; Thu, 12 Jul 2012 18:42:07 -0400 Date: Thu, 12 Jul 2012 18:42:07 -0400 From: "J. Bruce Fields" To: Simo Sorce Cc: bfields@redhat.com, linux-nfs@vger.kernel.org Subject: Re: [PATCH 0/4] Add support for new RPCSEC_GSS upcall mechanism for nfsd Message-ID: <20120712224207.GG24162@fieldses.org> References: <1337983796-26476-1-git-send-email-simo@redhat.com> <20120710204913.GA6038@fieldses.org> <20120710210511.GB6038@fieldses.org> <20120712123916.GB16822@fieldses.org> <1342130717.2718.32.camel@willson.li.ssimo.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1342130717.2718.32.camel@willson.li.ssimo.org> User-Agent: Mutt/1.5.20 (2009-06-14) Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org 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. --- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html 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);