Hi,

The NetBSD's MFI driver revision 1.16 fixes the deallocation of
non-allocated memory(last index), and not deallocating allocated
memory(index 0). Which isn't fixed in OpenBSD yet.

See:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/ic/mfi.c.diff?r1=1.15&r2=1.16&f=h&only_with_tag=MAIN

I've appended a possible fix below.

Kind regards,

David

--- mfi.c       2013-04-06 11:36:20.950903033 +0200
+++ mfi.c.orig  2012-09-12 08:53:05.000000000 +0200
@@ -290,9 +290,9 @@ mfi_init_ccb(struct mfi_softc *sc)
 destroy:
        /* free dma maps and ccb memory */
        while (i) {
-               i--;
                ccb = &sc->sc_ccb[i];
                bus_dmamap_destroy(sc->sc_dmat, ccb->ccb_dmamap);
+               i--;
        }

        free(sc->sc_ccb, M_DEVBUF);

Reply via email to