From owner-freebsd-bugs@FreeBSD.ORG Sat Feb 1 16:40:03 2014 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2B42DE34 for ; Sat, 1 Feb 2014 16:40:03 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id F0AE91B08 for ; Sat, 1 Feb 2014 16:40:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id s11Ge2OR089115 for ; Sat, 1 Feb 2014 16:40:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id s11Ge2am089114; Sat, 1 Feb 2014 16:40:02 GMT (envelope-from gnats) Date: Sat, 1 Feb 2014 16:40:02 GMT Message-Id: <201402011640.s11Ge2am089114@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: =?ISO-2022-JP?B?GyRCPi5MbjQyQDgbKEI=?= Subject: Re: kern/183835: Kernel panic with VIMAGE on insertion of axe USB network interface X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: =?ISO-2022-JP?B?GyRCPi5MbjQyQDgbKEI=?= List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Feb 2014 16:40:03 -0000 The following reply was made to PR kern/183835; it has been noted by GNATS. From: =?ISO-2022-JP?B?GyRCPi5MbjQyQDgbKEI=?= To: bug-followup@FreeBSD.org, elakin@infohell.net Cc: Subject: Re: kern/183835: Kernel panic with VIMAGE on insertion of axe USB network interface Date: Sun, 2 Feb 2014 01:37:35 +0900 --089e01183fb8665ffc04f15ae81e Content-Type: text/plain; charset=ISO-8859-1 Attached patch for src/sys/net/if.c makes if_axe work with VIMAGE. Though I do not understand well why it works... curvnet is allocated in src/sys/net/vnet.c:vnet0_init() and then substituted to NULL in vnet.c:vnet_init_done() I guess that devices that are persistent are if_alloc()'ed in between the two functions are called, but if_alloc() for removable devices like if_axe occurs after vnet_init_done(). (if is is right, creating vnet first and plugging the device in may not cause the kernel panic, but I did not test this idea.) Moreover, with this patch, error messages below occur when destroying epair device, so it does not seem to be the proper solution. Freed UMA keg (udp_inpcb) was not empty (128 items). Lost 8 pages of memory. Freed UMA keg (udpcb) was not empty (252 items). Lost 1 pages of memory. Freed UMA keg (tcp_inpcb) was not empty (128 items). Lost 8 pages of memory. Freed UMA keg (tcpcb) was not empty (30 items). Lost 6 pages of memory. hhook_vnet_uninit: hhook_head type=1, id=1 cleanup required hhook_vnet_uninit: hhook_head type=1, id=0 cleanup required --089e01183fb8665ffc04f15ae81e Content-Type: text/plain; charset=US-ASCII; name="if.c.diff" Content-Disposition: attachment; filename="if.c.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hr536wm70 LS0tIGlmLmMub3JpZwkyMDE0LTAxLTIxIDAyOjEwOjU5LjAwMDAwMDAwMCArMDkwMAorKysgaWYu YwkyMDE0LTAxLTMwIDAwOjA0OjAxLjAwMDAwMDAwMCArMDkwMApAQCAtNDMyLDYgKzQzMiwxMCBA QAogCXVfc2hvcnQgaWR4OwogCiAJaWZwID0gbWFsbG9jKHNpemVvZihzdHJ1Y3QgaWZuZXQpLCBN X0lGTkVULCBNX1dBSVRPS3xNX1pFUk8pOworI2lmZGVmIFZJTUFHRQorCWlmIChjdXJ2bmV0ID09 IE5VTEwpCisJCWN1cnZuZXQgPSB2bmV0MDsKKyNlbmRpZgogCUlGTkVUX1dMT0NLKCk7CiAJaWYg KGlmaW5kZXhfYWxsb2NfbG9ja2VkKCZpZHgpICE9IDApIHsKIAkJSUZORVRfV1VOTE9DSygpOwo= --089e01183fb8665ffc04f15ae81e--