Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Jul 2012 05:00:21 GMT
From:      Takanori Watanabe <takawata@init-main.com>
To:        freebsd-virtualization@FreeBSD.org
Subject:   Re: kern/170096: Dyanamically-attached network interface will crash with VIMAGE enabled kernel
Message-ID:  <201207240500.q6O50L8m036249@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR kern/170096; it has been noted by GNATS.

From: Takanori Watanabe <takawata@init-main.com>
To: FreeBSD-gnats-submit@FreeBSD.org, freebsd-virtualization@FreeBSD.org
Cc:  
Subject: Re: kern/170096: Dyanamically-attached network interface will crash with VIMAGE enabled kernel
Date: Tue, 24 Jul 2012 13:54:10 +0900

 It is fixed with following patch, though some consideration needed with
 kernel module:
 
 Index: usb_process.c
 ===================================================================
 --- usb_process.c       (revision 238557)
 +++ usb_process.c       (working copy)
 @@ -55,6 +55,7 @@
  #include <sys/proc.h>
  #include <sys/kthread.h>
  #include <sys/sched.h>
 +#include <net/vnet.h>
  
  #if (__FreeBSD_version < 700000)
  #define        thread_lock(td) mtx_lock_spin(&sched_lock)
 @@ -111,6 +112,9 @@
         td = curthread;
         thread_lock(td);
         sched_prio(td, up->up_prio);
 +#ifdef VIMAGE
 +       td->td_vnet = vnet0;
 +#endif
         thread_unlock(td);
  
         mtx_lock(up->up_mtx);
 ===
 



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