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

[Xen-changelog] Don't increment mi->usage is alloc_major_info return NULL



# HG changeset patch
# User vh249@xxxxxxxxxxxxxxxxxxxxxxxx
# Node ID ab93a9a46bd48f9a654b1fdc9caf4b7ae07f6a8b
# Parent  8f7ee9ab31ac36c84fcf499684803e72c3eef2ef
Don't increment mi->usage is alloc_major_info return NULL

Signed-off-by: Vincent Hanquez <vincent@xxxxxxxxxxxxx>

diff -r 8f7ee9ab31ac -r ab93a9a46bd4 
linux-2.6-xen-sparse/drivers/xen/blkfront/vbd.c
--- a/linux-2.6-xen-sparse/drivers/xen/blkfront/vbd.c   Sun Oct  9 15:26:08 2005
+++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/vbd.c   Sun Oct  9 16:29:24 2005
@@ -160,7 +160,8 @@
 
        mi = ((major_info[index] != NULL) ? major_info[index] :
              xlbd_alloc_major_info(major, minor, index));
-       mi->usage++;
+       if (mi)
+               mi->usage++;
        return mi;
 }
 

_______________________________________________
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®.