Re: quick hack to support "option VIMAGE" on USB Ethernet

From: YAMAMOTO Shigeru <shigeru_at_iij.ad.jp>
Date: Tue, 13 Aug 2013 12:57:09 +0900 (JST)
Hi all,

From: Craig Rodrigues <rodrigc_at_FreeBSD.org>
Subject: Re: quick hack to support "option VIMAGE" on USB Ethernet
Date: Mon, 12 Aug 2013 17:52:39 -0700
> I do not have a USB Ethernet device, and do not fully understand VIMAGE yet.
> Is your patch still necessary in CURRENT, after this patch was applied to
> subr_bus.c?
> 
> http://lists.freebsd.org/pipermail/svn-src-all/2013-July/071878.html

I make a patch for r254236_at_HEAD which is newer than r253346.

My try is,
1) I try to enable "option VIMAGE" at r254236_at_HEAD.
It causes panic at accessing V_if_index in ifindex_alloc_locked().

2) I try to protect if_alloc(IFT_ETHER) at ue_attach_post_task() using
 CURVNET_SET_QUIET(curvnet) and CURVNET_RESTORE().
It causes abort at CURVNET_SET_QUIET() becasue curvnet is NULL.

3) I create my patch.
It is saving curvnet at uether_ifattach() and using saved curvnet at calling
CURVNET_SET_QUIET().
It seems me work.

Thanks,
-------
YAMAMOTO Shigeru <shigeru_at_iij.ad.jp>
Received on Tue Aug 13 2013 - 02:01:43 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:40 UTC