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

[Xen-changelog] [linux-2.6.18-xen] blktap2: Fwd: Fix wild ptr deref during device destruction.



# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1267437354 0
# Node ID 46c3ae66c32b97bc66f2ed13a715839712972659
# Parent  4b0c1a686393ed4283e4942c6997354b7c37d370
blktap2: Fwd: Fix wild ptr deref during device destruction.

A put_disk() before blk_cleanup_queue() would free gd before gd->queue
is read.

Signed-off-by: Daniel Stodden <daniel.stodden@xxxxxxxxxx>
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 drivers/xen/blktap2/device.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -r 4b0c1a686393 -r 46c3ae66c32b drivers/xen/blktap2/device.c
--- a/drivers/xen/blktap2/device.c      Mon Mar 01 09:55:09 2010 +0000
+++ b/drivers/xen/blktap2/device.c      Mon Mar 01 09:55:54 2010 +0000
@@ -1082,8 +1082,8 @@ blktap_device_destroy(struct blktap *tap
 #endif
 
        del_gendisk(dev->gd);
+       blk_cleanup_queue(dev->gd->queue);
        put_disk(dev->gd);
-       blk_cleanup_queue(dev->gd->queue);
 
        dev->gd = NULL;
 

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