From owner-svn-src-head@FreeBSD.ORG Sat Jul 13 10:31:37 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 0D76B5FA; Sat, 13 Jul 2013 10:31:37 +0000 (UTC) (envelope-from crodr001@gmail.com) Received: from mail-lb0-x22f.google.com (mail-lb0-x22f.google.com [IPv6:2a00:1450:4010:c04::22f]) by mx1.freebsd.org (Postfix) with ESMTP id A4FED1A07; Sat, 13 Jul 2013 10:31:35 +0000 (UTC) Received: by mail-lb0-f175.google.com with SMTP id r10so8118243lbi.6 for ; Sat, 13 Jul 2013 03:31:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=aIebN9ihgd396g5PpZTY9O1VJ9Hd5PxGX2ia7Kzc2Ok=; b=tecVB6/u/Pe6mtwKPYeU0R7kd0Ilz3iSJgFyBiQ6fZEmkVF3o4BLBG/iMsolpJK92+ J1slFiTMwPFJICngUo6RhdKKYF8CeHg+5cl5Gv3aqHQr4UG304mnoiGZ7NJg8DgbEIUl eMe9H8BBcHmDeMO5s5br35Dji9cvIJcMsilwRqR3n1onlp/3fvW5mQFQ6Pfm7e8nbPmo wmgW6fECq2zhAyGr4gtDXQg6oNg5zvppWYa+OpCThxoHL97+WhxQmUZ0GhZYFSX6QZxr wYfCEoi6ouGj7+yTKStjOad77hjKn3yT3F2Zc3b/YiSR1NwakKILrhiksAC3Et8zOgMj RwQw== MIME-Version: 1.0 X-Received: by 10.112.172.35 with SMTP id az3mr20517896lbc.66.1373711494482; Sat, 13 Jul 2013 03:31:34 -0700 (PDT) Sender: crodr001@gmail.com Received: by 10.112.149.38 with HTTP; Sat, 13 Jul 2013 03:31:34 -0700 (PDT) In-Reply-To: <20130713073118.GC2757@gmail.com> References: <201307120803.r6C83ACp016523@svn.freebsd.org> <20130712202710.GB2757@gmail.com> <20130713073118.GC2757@gmail.com> Date: Sat, 13 Jul 2013 03:31:34 -0700 X-Google-Sender-Auth: hL9t3BS55LyZ14BQ2E__5bsdN9Q Message-ID: Subject: Re: svn commit: r253255 - head/sys/netgraph/bluetooth/drivers/ubt From: Craig Rodrigues To: Mikolaj Golub Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Adrian Chadd , src-committers@freebsd.org, Marko Zec X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 13 Jul 2013 10:31:37 -0000 On Sat, Jul 13, 2013 at 12:31 AM, Mikolaj Golub wrote: > > Your patch looks similar to Marko's: > > > http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20121115/0824ca85/attachment.diff > > > > Also, as I understand, after handling vnet context in > device_probe_and_attach(), there is no need in curvnet setting in > kldload/kldunload, and Marko removed it. > I experimented with Marko's patch, and found that the kernel crashed inside the code which initializes PF. (kgdb) where #0 doadump (textdump=) at pcpu.h:234 #1 0xffffffff80923e06 in kern_reboot (howto=260) at /usr/home/rodrigc/freebsd/9/sys/kern/kern_shutdown.c:449 #2 0xffffffff80924307 in panic (fmt=0x1
) at /usr/home/rodrigc/freebsd/9/sys/kern/kern_shutdown.c:637 #3 0xffffffff80ce9820 in trap_fatal (frame=0xc, eva=) at /usr/home/rodrigc/freebsd/9/sys/amd64/amd64/trap.c:879 #4 0xffffffff80ce9b81 in trap_pfault (frame=0xffffff8128845050, usermode=0) at /usr/home/rodrigc/freebsd/9/sys/amd64/amd64/trap.c:795 #5 0xffffffff80cea134 in trap (frame=0xffffff8128845050) at /usr/home/rodrigc/freebsd/9/sys/amd64/amd64/trap.c:463 #6 0xffffffff80cd3463 in calltrap () at /usr/home/rodrigc/freebsd/9/sys/amd64/amd64/exception.S:228 #7 0xffffffff820a0fb4 in init_zone_var () at /usr/home/rodrigc/freebsd/9/sys/modules/pf/../../contrib/pf/net/pf_ioctl.c:295 #8 0xffffffff820a34db in pf_modevent (mod=, type=, data=) at /usr/home/rodrigc/freebsd/9/sys/modules/pf/../../contrib/pf/net/pf_ioctl.c:4342 #9 0xffffffff8090ea48 in module_register_init (arg=) at /usr/home/rodrigc/freebsd/9/sys/kern/kern_module.c:123 #10 0xffffffff809069ce in linker_load_module (kldname=, modname=0xfffffe000730bc00 "pf", parent=0x0, verinfo=0x0, lfpp=0xffffff8128845958) at /usr/home/rodrigc/freebsd/9/sys/kern/kern_linker.c:237 #11 0xffffffff80907008 in kern_kldload (td=0xfffffe0007e10920, file=, ---Type to continue, or q to quit--- fileid=0xffffff81288459b4) at /usr/home/rodrigc/freebsd/9/sys/kern/kern_linker.c:1031 #12 0xffffffff80907224 in sys_kldload (td=0xfffffe0007e10920, uap=) at /usr/home/rodrigc/freebsd/9/sys/kern/kern_linker.c:1062 #13 0xffffffff80ce8fca in amd64_syscall (td=0xfffffe0007e10920, traced=0) at subr_syscall.c:135 #14 0xffffffff80cd3747 in Xfast_syscall () at /usr/home/rodrigc/freebsd/9/sys/amd64/amd64/exception.S:387 #15 0x000000080087e10c in ?? () #7 0xffffffff820a0fb4 in init_zone_var () at /usr/home/rodrigc/freebsd/9/sys/modules/pf/../../contrib/pf/net/pf_ioctl.c:295 295 { (kgdb) l 290 291 mtx_destroy(&pf_task_mtx); 292 } 293 void 294 init_zone_var(void) 295 { 296 V_pf_src_tree_pl = V_pf_rule_pl = NULL; 297 V_pf_state_pl = V_pf_state_key_pl = V_pf_state_item_pl = NULL; 298 V_pf_altq_pl = V_pf_pooladdr_pl = NULL; 299 V_pf_frent_pl = V_pf_frag_pl = V_pf_cache_pl = V_pf_cent_pl = NULL; In init_zone_var(), curthread->td_vnet was NULL. So, I don't think it is safe to remove the vnet stuff from kldload/kldunload just yet, without fixing some code in some kernel modules like PF. The other parts of the patch look OK. -- Craig