[prev in list] [next in list] [prev in thread] [next in thread]
List: openbsd-bugs
Subject: mfi(4) =?UTF-8?Q?mfi=5Finit=5Fccb=28=29=20cleanup=20fix?=
From: David Imhoff <dimhoff_devel () xs4all ! nl>
Date: 2013-04-06 9:49:26
Message-ID: 03412a27fd651f1b4ea47d867b72f0c1 () xs4all ! nl
[Download RAW message or body]
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);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic