Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Jun 2013 07:46:47 -0500
From:      Bryan Drewery <bdrewery@FreeBSD.org>
To:        Lawrence Stewart <lstewart@FreeBSD.org>
Cc:        svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org
Subject:   Re: svn commit: r251732 - in head/sys: kern sys
Message-ID:  <51BB10B7.5090306@FreeBSD.org>
In-Reply-To: <201306140410.r5E4AYnn052031@svn.freebsd.org>
References:  <201306140410.r5E4AYnn052031@svn.freebsd.org>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
On 6/13/2013 11:10 PM, Lawrence Stewart wrote:
> Author: lstewart
> Date: Fri Jun 14 04:10:34 2013
> New Revision: 251732
> URL: http://svnweb.freebsd.org/changeset/base/251732
> 
> Log:
>   Add support for non-virtualised hhook points, which are uniquely identified by
>   type and id, as compared to virtualised hook points which are now uniquely
>   identified by type, id and a vid (which for vimage is the pointer to the vnet
>   that the hhook resides in).
>   
>   All hhook_head structs for both virtualised and non-virtualised hook points
>   coexist in hhook_head_list, and a separate list is maintained for hhook points
>   within each vnet to simplify some vimage-related housekeeping.
>   
>   Reviewed by:	scottl
>   MFC after:	1 week
> 
> Modified:
>   head/sys/kern/kern_hhook.c
>   head/sys/sys/hhook.h
> 
> Modified: head/sys/kern/kern_hhook.c
> ==============================================================================
> --- head/sys/kern/kern_hhook.c	Fri Jun 14 03:58:52 2013	(r251731)
> +++ head/sys/kern/kern_hhook.c	Fri Jun 14 04:10:34 2013	(r251732)
> @@ -61,8 +61,9 @@ struct hhook {
>  static MALLOC_DEFINE(M_HHOOK, "hhook", "Helper hooks are linked off hhook_head lists");
>  
>  LIST_HEAD(hhookheadhead, hhook_head);
> -VNET_DEFINE(struct hhookheadhead, hhook_head_list);
> -#define	V_hhook_head_list VNET(hhook_head_list)
> +struct hhookheadhead hhook_head_list;
> +VNET_DEFINE(struct hhookheadhead, hhook_vhead_list);
> +#define	V_hhook_vhead_list VNET(hhook_vhead_list)
>  
>  static struct mtx hhook_head_list_lock;
>  MTX_SYSINIT(hhookheadlistlock, &hhook_head_list_lock, "hhook_head list lock",
> @@ -245,13 +246,6 @@ hhook_head_register(int32_t hhook_type, 
>  		return (EEXIST);
>  	}
>  
> -	/* XXXLAS: Need to implement support for non-virtualised hooks. */
> -	if ((flags & HHOOK_HEADISINVNET) == 0) {
> -		printf("%s: only vnet-style virtualised hooks can be used\n",
> -		    __func__);
> -		return (EINVAL);
> -	}
> -
>  	tmphhh = malloc(sizeof(struct hhook_head), M_HHOOK,
>  	    M_ZERO | ((flags & HHOOK_WAITOK) ? M_WAITOK : M_NOWAIT));
>  
> @@ -270,14 +264,15 @@ hhook_head_register(int32_t hhook_type, 
>  	} else
>  		refcount_init(&tmphhh->hhh_refcount, 0);
>  
> +	HHHLIST_LOCK();
>  	if (flags & HHOOK_HEADISINVNET) {
>  		tmphhh->hhh_flags |= HHH_ISINVNET;
> -		HHHLIST_LOCK();
> -		LIST_INSERT_HEAD(&V_hhook_head_list, tmphhh, hhh_next);
> -		HHHLIST_UNLOCK();
> -	} else {
> -		/* XXXLAS: Add tmphhh to the non-virtualised list. */
> +		KASSERT(curvnet != NULL, ("curvnet is NULL"));

I am hitting this on boot now. I'm having unrelated trouble with console
so am unable to get much more information from the panic.

https://dl.dropboxusercontent.com/u/8732004/curvnet.jpg

-- 
Regards,
Bryan Drewery


[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJRuxC3AAoJEG54KsA8mwz5JbIP/36NmMtZ8xFYHYeRlP4/CYtP
ThTz6JWdqIiAllDL29TmJ+ZYF3G8LbinTAVIC4mz2TqtOoJmb4H/EPAflw53GLYd
YHnodia3wmHre85OXm9rDadBS7lLgJENVAR6w64AixOAW2LJejfKyT4kXLXEgsmM
dP73aQjNXLhWGCfakqAow9D2SDuKo/8gJW7EblvMCw8CI/SrRui3TfZ1xCCrTCvJ
1QAuWoiz2omdXx2bt31iUP/Oqa/wspk6/bYDHwrRPiBYmOPAnWOem7JXa2vraCxM
Bl/wo+VDlN9x7xTU5Byj2KSjy9g1sLW/vOLwyBOrkyVTVV5v7+o8RGqNYmrzYruk
JoEkm/m9yOKVTf7QJDvE5fxz/YJtSkuZlXKqLzpy2sV4ZTogW28/yjgd0kjl4uie
cgasWOatu4bDAfvxDf9FJv6Vlh+w4dNAJkPzhtRXK6YZSlHegWvPYF4+i2m1qrRM
osoqCWtssJLKThKVDKf9NxNy8JEPpRCDUgDfDuDAIh0N1ygYX/nfJlnT3nN/kI6Y
SHai8XgTKFIupiC4ud5fvmLVXRc2OE211rbq/lT/6Koo0jQyTpDpAjjElKpNfpU7
VC+Pu1GGk+O967xTTp/CHZMdqIzvgAWgOd2NYs55r19luBMVpP9ffUNCAbiPE+ne
R9mta0xO+n3Qikz7q2U4
=DdXk
-----END PGP SIGNATURE-----
help

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?51BB10B7.5090306>