[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [linux-2.6.18-xen] [IA64] Add vmalloc failure test



# HG changeset patch
# User Alex Williamson <alex.williamson@xxxxxx>
# Date 1188326662 21600
# Node ID df2d73ab847a0766f016981704e04fb0a15819de
# Parent  72f2e9c1302da86348e88330913b790b15e9ec16
[IA64] Add vmalloc failure test

Signed-off-by: Alex Williamson <alex.williamson@xxxxxx>
---
 arch/ia64/kernel/salinfo.c |    5 +++++
 1 files changed, 5 insertions(+)

diff -r 72f2e9c1302d -r df2d73ab847a arch/ia64/kernel/salinfo.c
--- a/arch/ia64/kernel/salinfo.c        Tue Aug 28 12:40:47 2007 -0600
+++ b/arch/ia64/kernel/salinfo.c        Tue Aug 28 12:44:22 2007 -0600
@@ -381,6 +381,11 @@ salinfo_log_open(struct inode *inode, st
                unsigned long flags;
 
                entry = vmalloc(sizeof(ia64_mca_xencomm_t));
+               if (!entry) {
+                       data->open = 0;
+                       vfree(data->log_buffer);
+                       return -ENOMEM;
+               }
                entry->record = data->log_buffer;
                entry->handle = xencomm_map(data->log_buffer, 
                                        
ia64_sal_get_state_info_size(data->type));

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.