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-ppc-devel

Re: [XenPPC] [xenppc-unstable] [ppc] Handle 2 forms of NULL gues handle

On Thu, 2006-07-27 at 18:38 -0400, Jimi Xenidis wrote:
> On Jul 27, 2006, at 6:21 PM, Hollis Blanchard wrote:
> >
> > It is a caller error to pass a NULL pointer and claim it holds >0  
> > bytes.
> > If this is a recurring problem we should add
> >     BUG_ON((buffer == NULL) && (bytes != 0));
> 
> The specific offender is:
>    arch/powerpc/platforms/xen/hcall.c HYPERVISOR_xen_version 95 case  
> XENVER_pagesize:
>       case XENVER_pagesize:
>               argsize = sizeof(void *);
>               break;
> 
> so really we would want:
>       case XENVER_pagesize:
>               argsize = (arg == NULL) ? 0 : sizeof(void *);
>               break;
> 
> Then your logic would be correct and we can add your BUG_ON()  
> statement above.

Sounds like a plan. :)

-- 
Hollis Blanchard
IBM Linux Technology Center


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