From: John Levon Subject: Re: xenbus_dev_write and failed writes Date: Fri, 2 Mar 2007 16:35:35 +0000 Message-ID: <20070302163535.GA22543@totally.trollied.org.uk> References: <20070302160652.GB21544@totally.trollied.org.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Fri, Mar 02, 2007 at 04:26:22PM +0000, Keir Fraser wrote: > On 2/3/07 16:06, "John Levon" wrote: > > > In several places after setting u->len we return directly on error. > > Apart from the partial write case, it seems all of these should be > > resetting u->len to 0 as happens in the success case? > > Indeed. Now fixed (along with a couple of other bugs in that function). Also, the BUG_ON in xenbusdrv_queue_reply() looks odd to me (in fact the whole function does). Are we really guaranteed that a reply message will be less than a page size? And it doesn't seem right to just stomp on the buffer contents if we wrap right past the consumer value. We've seen both the BUG_ON (well, the ASSERT) and "xenstore-ls /" hang. Looking into exactly why now... regards john