Hi, I think is a bug in sys/dev/ic/mfi.c noticed during "PATCH: further kernel malloc -> mallocarray" review[1]
I see the mallocarray() patch seems to have been applied. Want to make sure if this is in fact a bug, that it is not overlooked. Ignore if this is noise. Cheers, --patrick [1] http://marc.info/?t=140548670700001&r=1&w=2 Index: mfi.c =================================================================== RCS file: /cvs/src/sys/dev/ic/mfi.c,v retrieving revision 1.154 diff -u -p -u -p -r1.154 mfi.c --- mfi.c 13 Jul 2014 23:10:23 -0000 1.154 +++ mfi.c 16 Jul 2014 17:57:04 -0000 @@ -2149,7 +2149,7 @@ mfi_create_sensors(struct mfi_softc *sc) } sc->sc_bbu_status = malloc(sizeof(*sc->sc_bbu_status) * - sizeof(mfi_bbu_indicators), M_DEVBUF, M_WAITOK | M_ZERO); + nitems(mfi_bbu_indicators), M_DEVBUF, M_WAITOK | M_ZERO); for (i = 0; i < nitems(mfi_bbu_indicators); i++) { sc->sc_bbu_status[i].type = SENSOR_INDICATOR;