The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=32b99a26c37ffcba4b1437f548cbbe7fcf1323dc
commit 32b99a26c37ffcba4b1437f548cbbe7fcf1323dc Author: Justin Hibbits <[email protected]> AuthorDate: 2026-08-27 21:37:32 +0000 Commit: Justin Hibbits <[email protected]> CommitDate: 2026-08-30 04:05:03 +0000 dpaa/fman: Pad the qman channel search array The loop goes over the qman channel total (16), so if a port ID is not found in the list it could walk off the end of the list and return garbage. Not a problem in practice, as only valid ports are included in our device trees, but protect it anyway. --- sys/dev/dpaa/fman.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/dpaa/fman.c b/sys/dev/dpaa/fman.c index 84350853949f..880f881a33bc 100644 --- a/sys/dev/dpaa/fman.c +++ b/sys/dev/dpaa/fman.c @@ -818,7 +818,7 @@ fman_qman_channel_id(device_t dev, int port) if (sc->sc_revision_major >= 6) { static const int qman_port_id[] = { 0x30, 0x31, 0x28, 0x29, 0x2a, 0x2b, - 0x2c, 0x2d, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 + 0x2c, 0x2d, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x07, 0x07 }; for (i = 0; i < sc->qman_chan_count; i++) { if (qman_port_id[i] == port) @@ -826,8 +826,8 @@ fman_qman_channel_id(device_t dev, int port) } } else { static const int qman_port_id[] = { - 0x31, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x01, - 0x02, 0x03, 0x04, 0x05, 0x06, 0x07 + 0x30, 0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x01, + 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x07, 0x07, 0x07 }; for (i = 0; i < sc->qman_chan_count; i++) { if (qman_port_id[i] == port)
