DF-3874 / fix.diff
--- a/sys/dev/raid/mfi/mfi.c +++ b/sys/dev/raid/mfi/mfi.c @@ -1328,6 +1328,9 @@ mfi_syspdprobe(struct mfi_softc *sc) /* Get each PD and add it to the system */ + if (pdlist->count > MAX_SYS_PDS) + pdlist->count = MAX_SYS_PDS; for (i = 0; i < pdlist->count; i++) { @@ -1393,6 +1396,9 @@ mfi_ldprobe(struct mfi_softc *sc) } + if (list->ld_count > MFI_MAX_LD) + list->ld_count = MFI_MAX_LD; for (i = 0; i < list->ld_count; i++) { @@ -1767,6 +1773,9 @@ mfi_parse_entries(struct mfi_softc *sc, int start_seq, int stop_seq) lockmgr(&sc->mfi_io_lock, LK_EXCLUSIVE); mfi_release_command(cm); lockmgr(&sc->mfi_io_lock, LK_RELEASE); + if (el->count > MAX_EVENTS) + el->count = MAX_EVENTS; for (i = 0; i < el->count; i++) { |