From patchwork Thu Jun 2 19:07:35 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bryan Schumaker X-Patchwork-Id: 844722 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p52J7jUf005569 for ; Thu, 2 Jun 2011 19:07:45 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753396Ab1FBTHj (ORCPT ); Thu, 2 Jun 2011 15:07:39 -0400 Received: from mx2.netapp.com ([216.240.18.37]:34817 "EHLO mx2.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752614Ab1FBTHi (ORCPT ); Thu, 2 Jun 2011 15:07:38 -0400 X-IronPort-AV: E=Sophos;i="4.65,311,1304319600"; d="scan'208";a="552630434" Received: from smtp1.corp.netapp.com ([10.57.156.124]) by mx2-out.netapp.com with ESMTP; 02 Jun 2011 12:07:37 -0700 Received: from davros.hq.netapp.com (vpn2ntap-258447.hq.netapp.com [10.30.30.79] (may be forged)) by smtp1.corp.netapp.com (8.13.1/8.13.1/NTAP-1.6) with ESMTP id p52J7aNg022700; Thu, 2 Jun 2011 12:07:36 -0700 (PDT) From: bjschuma@netapp.com To: Trond.Myklebust@netapp.com Cc: linux-nfs@vger.kernel.org, Bryan Schumaker Subject: [PATCH] NFS: Fix decode_secinfo_maxsz Date: Thu, 2 Jun 2011 15:07:35 -0400 Message-Id: <1307041655-17529-1-git-send-email-bjschuma@netapp.com> X-Mailer: git-send-email 1.7.5.2 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Thu, 02 Jun 2011 19:07:45 +0000 (UTC) From: Bryan Schumaker I initially did the calculation in bytes, and not words Signed-off-by: Bryan Schumaker --- fs/nfs/nfs4xdr.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index fcf2f33..43ac47d 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c @@ -255,7 +255,7 @@ static int nfs4_stat_to_errno(int); #define decode_fs_locations_maxsz \ (0) #define encode_secinfo_maxsz (op_encode_hdr_maxsz + nfs4_name_maxsz) -#define decode_secinfo_maxsz (op_decode_hdr_maxsz + 4 + (NFS_MAX_SECFLAVORS * (16 + GSS_OID_MAX_LEN))) +#define decode_secinfo_maxsz (op_decode_hdr_maxsz + 1 + ((NFS_MAX_SECFLAVORS * (16 + GSS_OID_MAX_LEN)) / 4)) #if defined(CONFIG_NFS_V4_1) #define NFS4_MAX_MACHINE_NAME_LEN (64)