|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v8.1 08/27] arm/x86/vmap: Add vmalloc_xen, vfree_xen and vm_init_type
>>> Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> 04/14/16 12:03 AM >>>
>Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>
>Suggested-by: Jan Beulich <jbeulich@xxxxxxxx>
>Acked-by: Julien Grall <julien.grall@xxxxxxx> [ARM]
>Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Is that really the case? I think it was Andrew who suggested to not expose a
second variant of vfree(), as the address type can be inferred from the address.
>@@ -52,27 +55,30 @@ void *vm_alloc(unsigned int nr, unsigned int align)
>else if ( align & (align - 1) )
>align &= -align;
>
>+ if ( !vm_base[t] )
>+ return NULL;
How about ASSERT()ing that t is in range before using it as an array index?
With the address/type parameter redundancy dropped at the very least from
the non-internal functions, I think everything else here is fine.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |