freebsd-skq/sys/dev/isp
will 063ae3ec95 Fix a kernel panic when unloading isp(4).
In the current implementation, the isp_kthread() threads never exit.

The target threads do have an exit mode from isp_attach(), but it is
not invoked from isp_detach().

Ensure isp_detach() notifies threads started for each channel, such
that they exit before their parent device softc detaches, and thus
before the module does.  Otherwise, a page fault panic occurs later in:

sysctl_kern_proc
  sysctl_out_proc
    kern_proc_out
      fill_kinfo_proc
        fill_kinfo_thread
          strlcpy(kp->ki_wmesg, td->td_wmesg, sizeof(kp->ki_wmesg));

For isp_kthread() (and isp(4) target threads), td->td_wmesg references
now-unmapped memory after the module has been unloaded.  These threads
are typically msleep()ing at the time of unload, but they could also
attempt to execute now-unmapped code segments.

MFC after:	1 month
Sponsored by:	Spectra Logic
MFSpectraBSD:	r1070921 on 2014/06/22 13:01:17
2014-09-18 02:01:36 +00:00
..
DriverManual.txt
Hardware.txt
isp_freebsd.c Fix a kernel panic when unloading isp(4). 2014-09-18 02:01:36 +00:00
isp_freebsd.h Fix a kernel panic when unloading isp(4). 2014-09-18 02:01:36 +00:00
isp_ioctl.h
isp_library.c Fix I/O freezes in some cases, caused by r257916. 2014-02-05 16:22:02 +00:00
isp_library.h
isp_pci.c Add missing calls to bus_dmamap_unload() when freeing static DMA 2014-06-13 18:20:44 +00:00
isp_sbus.c Reform the busdma API so that new types may be added without modifying 2013-02-12 16:57:20 +00:00
isp_stds.h
isp_target.c
isp_target.h
isp.c Harvest one no longer used constant string. 2013-12-25 04:51:56 +00:00
ispmbox.h
ispreg.h When fiddling with options of which registers to copy out for 2013-07-13 21:24:25 +00:00
ispvar.h Optimize isp(4) to reduce CPU usage, especially in target mode: 2013-10-17 20:19:15 +00:00