From patchwork Fri Jul 16 18:39:01 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Latchesar Ionkov X-Patchwork-Id: 112482 X-Patchwork-Delegate: ericvh@gmail.com Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) by demeter.kernel.org (8.14.4/8.14.3) with ESMTP id o6GIdJX8003077 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 16 Jul 2010 18:39:55 GMT Received: from localhost ([127.0.0.1] helo=sfs-ml-1.v29.ch3.sourceforge.com) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1OZpoV-0005Kr-3q; Fri, 16 Jul 2010 18:39:11 +0000 Received: from sfi-mx-1.v28.ch3.sourceforge.com ([172.29.28.121] helo=mx.sourceforge.net) by sfs-ml-1.v29.ch3.sourceforge.com with esmtp (Exim 4.69) (envelope-from ) id 1OZpoT-0005Kj-W0 for v9fs-developer@lists.sourceforge.net; Fri, 16 Jul 2010 18:39:09 +0000 Received-SPF: pass (sfi-mx-1.v28.ch3.sourceforge.com: domain of gmail.com designates 209.85.214.47 as permitted sender) client-ip=209.85.214.47; envelope-from=lionkov@gmail.com; helo=mail-bw0-f47.google.com; Received: from mail-bw0-f47.google.com ([209.85.214.47]) by sfi-mx-1.v28.ch3.sourceforge.com with esmtp (Exim 4.69) id 1OZpoR-0004th-Ln for v9fs-developer@lists.sourceforge.net; Fri, 16 Jul 2010 18:39:09 +0000 Received: by bwz10 with SMTP id 10so1804685bwz.34 for ; Fri, 16 Jul 2010 11:39:01 -0700 (PDT) MIME-Version: 1.0 Received: by 10.204.163.77 with SMTP id z13mr1238485bkx.169.1279305541602; Fri, 16 Jul 2010 11:39:01 -0700 (PDT) Received: by 10.204.100.204 with HTTP; Fri, 16 Jul 2010 11:39:01 -0700 (PDT) Date: Fri, 16 Jul 2010 12:39:01 -0600 X-Google-Sender-Auth: 45C6R_K5DeCy5jrl2tLNZcBujds Message-ID: From: Latchesar Ionkov To: V9FS Developers X-Spam-Score: -1.5 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain -0.0 SPF_PASS SPF: sender matches SPF record -0.0 DKIM_VERIFIED Domain Keys Identified Mail: signature passes verification 0.0 DKIM_SIGNED Domain Keys Identified Mail: message has a signature X-Headers-End: 1OZpoR-0004th-Ln Subject: [V9fs-developer] [PATCH] 9p: Pass the correct end of buffer to p9stat_read X-BeenThere: v9fs-developer@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: v9fs-developer-bounces@lists.sourceforge.net X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Fri, 16 Jul 2010 18:39:55 +0000 (UTC) diff --git a/fs/9p/vfs_dir.c b/fs/9p/vfs_dir.c index d61e3b2..36d961f 100644 --- a/fs/9p/vfs_dir.c +++ b/fs/9p/vfs_dir.c @@ -146,7 +146,7 @@ static int v9fs_dir_readdir(struct file *filp, void *dirent, filldir_t filldir) while (rdir->head < rdir->tail) { p9stat_init(&st); err = p9stat_read(rdir->buf + rdir->head, - buflen - rdir->head, &st, + rdir->tail - rdir->head, &st, fid->clnt->proto_version); if (err) {