From: Brad Boyer Subject: Re: [PATCH 2/2] net/9p: Return error on read with NULL buffer Date: Sat, 23 Oct 2010 12:59:57 -0700 Message-ID: <20101023195957.GA13348@cynthia.pants.nu> References: <1287412853-24700-1-git-send-email-aneesh.kumar@linux.vnet.ibm.com> <1287412853-24700-2-git-send-email-aneesh.kumar@linux.vnet.ibm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: v9fs-developer@lists.sourceforge.net, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Sanchit Garg To: "Aneesh Kumar K.V" Return-path: Content-Disposition: inline In-Reply-To: <1287412853-24700-2-git-send-email-aneesh.kumar@linux.vnet.ibm.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Mon, Oct 18, 2010 at 08:10:53PM +0530, Aneesh Kumar K.V wrote: > This patch ensures that a read(fd, NULL, 0 ) returns EFAULT on a 9p file. Is there some specific reason you want this behavior? I believe the generic Linux code returns success in this case. I tried this exact system call with fd being a pty or a file on ext3 and got 0 for both. Brad Boyer flar@allandria.com