[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-ia64-devel] [PATCH]: Small fix in using allocate_resource() in dom0
Hi, while using xen_ia64_allocate_resource() for mapping domU memory into dom0 I got dom0-panic's from time to time when executing 'cat /proc/iomem'. I tracked this down to a not cleared kmalloced resource before using it in allocate_resource(). Thanks. Dietmar # HG changeset patch # User dietmar.hahn@xxxxxxxxxxxxxxxxxxx # Date 1180420468 -7200 # Node ID 1a4de9e4a63756354a695528468145d1426db422 # Parent 2b14a1f22eecc73807578ceb78fa994449911d8b The resource structure has to be cleared before using it in allocate_resource(). Signed-off-by: Dietmar Hahn <dietmar.hahn@xxxxxxxxxxxxxxxxxxx> diff -r 2b14a1f22eec -r 1a4de9e4a637 linux-2.6-xen-sparse/arch/ia64/xen/hypervisor.c --- a/linux-2.6-xen-sparse/arch/ia64/xen/hypervisor.c Fri May 25 09:43:21 2007 -0600 +++ b/linux-2.6-xen-sparse/arch/ia64/xen/hypervisor.c Tue May 29 08:34:28 2007 +0200 @@ -1208,7 +1208,7 @@ xen_ia64_allocate_resource(unsigned long struct resource* res; int error; - res = kmalloc(sizeof(*res), GFP_KERNEL); + res = kzalloc(sizeof(*res), GFP_KERNEL); if (res == NULL) return ERR_PTR(-ENOMEM); _______________________________________________ Xen-ia64-devel mailing list Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-ia64-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |