Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Mar 2016 18:21:18 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-amd64@FreeBSD.org
Subject:   [Bug 208339] Early failure in ixl_attach causes kernel panic
Message-ID:  <bug-208339-6@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
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: <Intel(R) Ethernet Connection XL710 Driver, Version - 1.4.3> 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.=



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