svn commit: r251732 - in head/sys: kern sys
Bryan Drewery
bdrewery at FreeBSD.org
Fri Jun 14 12:47:03 UTC 2013
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 899 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/svn-src-head/attachments/20130614/47444488/attachment.sig>
More information about the svn-src-head
mailing list