WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [PATCH 1 of 8] blktap: Fix tap kobj double unref in sysfs_de

To: Xen <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH 1 of 8] blktap: Fix tap kobj double unref in sysfs_destroy
From: Daniel Stodden <daniel.stodden@xxxxxxxxxx>
Date: Fri, 26 Feb 2010 16:04:49 -0000
Cc: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Delivery-date: Fri, 26 Feb 2010 08:06:52 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <patchbomb.1267200288@xxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <patchbomb.1267200288@xxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mercurial-patchbomb/1.3.1
It's that final put_device in device_unregister which is supposed to
clear the caller's reference. Subtle indeed, because refcount went
2->3 when after sysfs_destroy:

 +1 for our own ring->dev
 +1 for the open sysfs ./remove attribute
 +1 for the callback scheduled

Drops to 1 in device_unregister and 0 only after leaving callbacks.

Signed-off-by: Daniel Stodden <daniel.stodden@xxxxxxxxxx>


Attachment: fix-double-free.diff
Description: Text Data

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