From patchwork Sun Jul 6 03:34:43 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kinglong Mee X-Patchwork-Id: 4489111 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id CDE3CBEEAA for ; Sun, 6 Jul 2014 03:35:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D03E02037E for ; Sun, 6 Jul 2014 03:35:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C2F4820375 for ; Sun, 6 Jul 2014 03:35:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752145AbaGFDfk (ORCPT ); Sat, 5 Jul 2014 23:35:40 -0400 Received: from mail-pa0-f43.google.com ([209.85.220.43]:52774 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751991AbaGFDfk (ORCPT ); Sat, 5 Jul 2014 23:35:40 -0400 Received: by mail-pa0-f43.google.com with SMTP id lf10so3665865pab.30 for ; Sat, 05 Jul 2014 20:35:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:cc:subject :content-type:content-transfer-encoding; bh=TkWREvusHRBywerXVA7vyqW78G7TaWKZH6urAQxeo7M=; b=urM36IwuehFAALJjhFpm/Bx8ChPBm+OWglCSoKjqWfWI/pxWiBMUP9a7jJIUOsW6AR H/25LIsVv9WVeWVXd8Ys+Ijwqz2OPQBdV+DvJzlSakYgPoQim4W/EIaEI4JdSotf9LBc zV4lpPRZ/6YZb1Piai9L4Rk+RFtsfg4sRP/qtgem7olRSI4qOZ8bCz1AODHYipuQv//1 wjf6PwaJmUZ2xwUDRyqCAwCBE6H1KlgO8vqCh90vdsJSr99P4fcn6tOwdnCQJ5Mimjoi wSopioV59NWRH3V02jDxX+/ebydfcgw6Y8uhajauwqoQ/JS8Mcog7Nu8PMs5lN0SIgn0 Qy8Q== X-Received: by 10.70.49.81 with SMTP id s17mr19797073pdn.38.1404617739816; Sat, 05 Jul 2014 20:35:39 -0700 (PDT) Received: from [192.168.0.100] ([171.215.249.246]) by mx.google.com with ESMTPSA id id10sm48520477pbc.35.2014.07.05.20.35.36 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 05 Jul 2014 20:35:38 -0700 (PDT) Message-ID: <53B8C3D3.7080201@gmail.com> Date: Sun, 06 Jul 2014 11:34:43 +0800 From: Kinglong Mee User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: "J. Bruce Fields" CC: kinglongmee@gmail.com, Linux NFS Mailing List Subject: [PATCH] nfsd: Fix bad reserving space for encoding rdattr_error Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Introduced by commit 561f0ed498 (nfsd4: allow large readdirs). Signed-off-by: Kinglong Mee --- fs/nfsd/nfs4xdr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfsd/nfs4xdr.c b/fs/nfsd/nfs4xdr.c index 3540462..5a1d088 100644 --- a/fs/nfsd/nfs4xdr.c +++ b/fs/nfsd/nfs4xdr.c @@ -2646,7 +2646,7 @@ nfsd4_encode_rdattr_error(struct xdr_stream *xdr, __be32 nfserr) { __be32 *p; - p = xdr_reserve_space(xdr, 6); + p = xdr_reserve_space(xdr, 20); if (!p) return NULL; *p++ = htonl(2);