From owner-freebsd-amd64@freebsd.org Sun Mar 27 18:21:18 2016 Return-Path: Delivered-To: freebsd-amd64@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 89633ADFD0A for ; Sun, 27 Mar 2016 18:21:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A2E414D0 for ; Sun, 27 Mar 2016 18:21:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u2RILIGR083671 for ; Sun, 27 Mar 2016 18:21:18 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-amd64@FreeBSD.org Subject: [Bug 208339] Early failure in ixl_attach causes kernel panic Date: Sun, 27 Mar 2016 18:21:18 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.2-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: hibler@gmail.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter cc Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-Mailman-Approved-At: Sun, 27 Mar 2016 19:38:49 +0000 X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Mar 2016 18:21:18 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D208339 Bug ID: 208339 Summary: Early failure in ixl_attach causes kernel panic Product: Base System Version: 10.2-STABLE Hardware: amd64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: freebsd-bugs@FreeBSD.org Reporter: hibler@gmail.com CC: freebsd-amd64@FreeBSD.org CC: freebsd-amd64@FreeBSD.org FreeBSD 10 Stable kernel with FreeBSD current dev/ixl driver gives: ---- ixl0: mem 0x93000000-0x93ffffff,0x94018000-0x9401ffff irq 42 at device 0.0 on pci6 ixl0: Using MSIX interrupts with 9 vectors ixl0: PF reset failure fffffff1 Fatal trap 12: page fault while in kernel mode cpuid =3D 0; apic id =3D 00 fault virtual address =3D 0x42 fault code =3D supervisor read data, page not present instruction pointer =3D 0x20:0xffffffff805be550 stack pointer =3D 0x28:0xffffffff8424c0c0 frame pointer =3D 0x28:0xffffffff8424c110 code segment =3D base 0x0, limit 0xfffff, type 0x1b =3D DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags =3D interrupt enabled, resume, IOPL =3D 0 current process =3D 0 (swapper) trap number =3D 12 panic: page fault cpuid =3D 0 KDB: stack backtrace: #0 0xffffffff809aa470 at kdb_backtrace+0x60 #1 0xffffffff8096d1c6 at vpanic+0x126 #2 0xffffffff8096d093 at panic+0x43 #3 0xffffffff80d71fcb at trap_fatal+0x36b #4 0xffffffff80d722cd at trap_pfault+0x2ed #5 0xffffffff80d7194a at trap+0x47a #6 0xffffffff80d579a2 at calltrap+0x8 #7 0xffffffff805bf850 at ixl_attach+0xf00 #8 0xffffffff809a069d at device_attach+0x43d #9 0xffffffff809a17dd at bus_generic_attach+0x2d #10 0xffffffff80381c8c at acpi_pci_attach+0x15c #11 0xffffffff809a069d at device_attach+0x43d #12 0xffffffff809a17dd at bus_generic_attach+0x2d #13 0xffffffff80383dbc at acpi_pcib_attach+0x22c #14 0xffffffff8038501f at acpi_pcib_pci_attach+0x9f #15 0xffffffff809a069d at device_attach+0x43d #16 0xffffffff809a17dd at bus_generic_attach+0x2d #17 0xffffffff80381c8c at acpi_pci_attach+0x15c Uptime: 1s ---- The panic is actually in ixl_free_vsi because vsi->queues has not been initialized. Note that ANY early error prior to: ---- /* Set up VSI and queues */ if (ixl_setup_stations(pf) !=3D 0) { device_printf(dev, "setup stations failed!\n"); error =3D ENOMEM; goto err_mac_hmc; } /* Initialize mac filter list for VSI */ SLIST_INIT(&vsi->ftl); ---- is going to cause this panic. I am aware of base r295946 but that does not = fix the problem. The hack fix is: ---- *** if_ixl.c.orig Sun Mar 27 12:17:28 2016 --- if_ixl.c Sun Mar 27 11:41:43 2016 *************** *** 731,737 **** i40e_shutdown_adminq(hw); err_out: ixl_free_pci_resources(pf); ! ixl_free_vsi(vsi); IXL_PF_LOCK_DESTROY(pf); return (error); } --- 731,738 ---- i40e_shutdown_adminq(hw); err_out: ixl_free_pci_resources(pf); ! if (vsi->queues !=3D NULL) ! ixl_free_vsi(vsi); IXL_PF_LOCK_DESTROY(pf); return (error); } --=20 You are receiving this mail because: You are on the CC list for the bug.=