summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe
diff options
context:
space:
mode:
authorjym <jym@NetBSD.org>2009-03-13 21:57:07 +0000
committerjym <jym@NetBSD.org>2009-03-13 21:57:07 +0000
commit96f9080096e484cbe161b580c92c2c8e16f49e32 (patch)
treee64feb7210cca53b3246e3b6f6a6e940cda27612 /sys/dev/raidframe
parent1894a7d27bc4d74520befd192d33fe33f3feebbf (diff)
Fixes in the iwi(4) driver to better handle errors:
- bus_dmamap fixes, with checks against NULL - move the rings' allocation code later in iwi_attach() to avoid NULL pointer dereference if allocation fails - avoid double free() in case of failure during attach. If an allocation fails, do not free the ring directly, as it is handled by iwi_detach() - only set ring->count for RX/TX rings when ring allocation is successful, or else the for loop during detach will fail with a NULL dereference. - call pci_intr_disestablish() if iwi_reset() fails during attach; driver is in an incoherent state, interrupt handler should not be used. Proposed by me on tech-net@, approved by christos@. Compiled and tested with GENERIC and XEN3_DOM0 kernels.
Diffstat (limited to 'sys/dev/raidframe')
0 files changed, 0 insertions, 0 deletions