svn commit: r237518 - in head: share/man/man9 sys/cam/scsi sys/dev/xen/blkfront sys/geom

Andrey V. Elsukov ae at FreeBSD.org
Mon Jun 25 03:48:12 UTC 2012


On 24.06.2012 8:29, Kenneth D. Merry wrote:
> Author: ken
> Date: Sun Jun 24 04:29:03 2012
> New Revision: 237518
> URL: http://svn.freebsd.org/changeset/base/237518
> 
> Log:
>   Fix a bug which causes a panic in daopen(). The panic is caused by
>   a da(4) instance going away while GEOM is still probing it.
>   
>   In this case, the GEOM disk class instance has been created by
>   disk_create(), and the taste of the disk is queued in the GEOM
>   event queue.
>   
>   While that event is queued, the da(4) instance goes away.  When the
>   open call comes into the da(4) driver, it dereferences the freed
>   (but non-NULL) peripheral pointer provided by GEOM, which results
>   in a panic.
>   
>   The solution is to add a callback to the GEOM disk code that is
>   called when all of its resources are cleaned up.  This is
>   implemented inside GEOM by adding an optional callback that is
>   called when all consumers have detached from a provider, and the
>   provider is about to be deleted.

>   
>   geom.h:		Add a new, optional, providergone callback that
>   		is called when a provider is about to be deleted.
>   
>   MFC after:	5 days

This will break ABI. If you want to merge this change,
it is better to use one of spare field in the geom structures.

> @@ -102,6 +103,7 @@ struct g_class {
>  	g_start_t		*start;
>  	g_spoiled_t		*spoiled;
>  	g_attrchanged_t		*attrchanged;
> +	g_provgone_t		*providergone;
>  	g_dumpconf_t		*dumpconf;
>  	g_access_t		*access;
>  	g_orphan_t		*orphan;
> @@ -133,6 +135,7 @@ struct g_geom {
>  	g_start_t		*start;
>  	g_spoiled_t		*spoiled;
>  	g_attrchanged_t		*attrchanged;
> +	g_provgone_t		*providergone;
>  	g_dumpconf_t		*dumpconf;
>  	g_access_t		*access;
>  	g_orphan_t		*orphan;

-- 
WBR, Andrey V. Elsukov



-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
Url : http://lists.freebsd.org/pipermail/svn-src-all/attachments/20120625/a4511960/signature.pgp


More information about the svn-src-all mailing list