From: Jeremy Fitzhardinge Subject: Re: A bug in Xenbus driver Date: Wed, 25 Aug 2010 12:15:03 -0700 Message-ID: <4C756BB7.70801@goop.org> References: <433DDF91DFB08148BAD3FDB6FDDA314C9F35F3BB47@LONPMAILBOX01.citrite.net> <4C756ADF.1000207@goop.org> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4C756ADF.1000207@goop.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Jun Zhu (Intern)" Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On 08/25/2010 12:11 PM, Jeremy Fitzhardinge wrote: > copy_to_user returns the number of uncopied bytes, so if ret != sz, then > some part of the data was not copied due to a memory fault problem. No, wait, I've contradicted myself. copy_to_user does return the number of uncopied bytes, so the result should be 0 on success, and you're right, the test should be "ret != 0". Sorry about that. J