WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Re: [Xen-changelog] [xen-unstable] linux: Fix xenbus dev

To: John Levon <levon@xxxxxxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Re: [Xen-changelog] [xen-unstable] linux: Fix xenbus device write function.
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Thu, 08 Mar 2007 07:52:28 +0000
Delivery-date: Wed, 07 Mar 2007 23:51:02 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20070307194831.GA8239@xxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcdhVret9lrQ981JEduPKQAWy6hiGQ==
Thread-topic: [Xen-devel] Re: [Xen-changelog] [xen-unstable] linux: Fix xenbus device write function.
User-agent: Microsoft-Entourage/11.3.3.061214


On 7/3/07 19:48, "John Levon" <levon@xxxxxxxxxxxxxxxxx> wrote:

>> u->len += len;
>> - if (u->len < (sizeof(u->u.msg) + u->u.msg.len))
>> -  return len;
>> + if ((u->len < sizeof(u->u.msg)) ||
>> +     (u->len < (sizeof(u->u.msg) + u->u.msg.len)))
>> +  return rc;
> 
> What is this trying to achieve?

Check you have a complete header before comparing on the header's length
field.

 -- Keir



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>