Message ID | 20210927135849.1595484-1-arnd@kernel.org (mailing list archive) |
---|---|
State | Accepted |
Commit | d68c2e1d19c540464ad12a8a11bdd88eedcaf3dc |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | net: stmmac: fix off-by-one error in sanity check | expand |
Context | Check | Description |
---|---|---|
netdev/cover_letter | success | Link |
netdev/fixes_present | success | Link |
netdev/patch_count | success | Link |
netdev/tree_selection | success | Guessed tree name to be net-next |
netdev/subject_prefix | warning | Target tree name not specified in the subject |
netdev/cc_maintainers | warning | 1 maintainers not CCed: linux-stm32@st-md-mailman.stormreply.com |
netdev/source_inline | success | Was 0 now: 0 |
netdev/verify_signedoff | success | Link |
netdev/module_param | success | Was 0 now: 0 |
netdev/build_32bit | success | Errors and warnings before: 0 this patch: 0 |
netdev/kdoc | success | Errors and warnings before: 0 this patch: 0 |
netdev/verify_fixes | success | Link |
netdev/checkpatch | success | total: 0 errors, 0 warnings, 0 checks, 16 lines checked |
netdev/build_allmodconfig_warn | success | Errors and warnings before: 0 this patch: 0 |
netdev/header_inline | success | Link |
Hello: This patch was applied to netdev/net-next.git (refs/heads/master): On Mon, 27 Sep 2021 15:58:29 +0200 you wrote: > From: Arnd Bergmann <arnd@arndb.de> > > My previous patch had an off-by-one error in the added sanity > check, the arrays are MTL_MAX_{RX,TX}_QUEUES long, so if that > index is that number, it has overflown. > > The patch silenced the warning anyway because the strings could > no longer overlap with the input, but they could still overlap > with other fields. > > [...] Here is the summary with links: - net: stmmac: fix off-by-one error in sanity check https://git.kernel.org/netdev/net-next/c/d68c2e1d19c5 You are awesome, thank you! -- Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 640c0ffdff3d..fd4c6517125e 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -3502,7 +3502,7 @@ static int stmmac_request_irq_multi_msi(struct net_device *dev) /* Request Rx MSI irq */ for (i = 0; i < priv->plat->rx_queues_to_use; i++) { - if (i > MTL_MAX_RX_QUEUES) + if (i >= MTL_MAX_RX_QUEUES) break; if (priv->rx_irq[i] == 0) continue; @@ -3527,7 +3527,7 @@ static int stmmac_request_irq_multi_msi(struct net_device *dev) /* Request Tx MSI irq */ for (i = 0; i < priv->plat->tx_queues_to_use; i++) { - if (i > MTL_MAX_TX_QUEUES) + if (i >= MTL_MAX_TX_QUEUES) break; if (priv->tx_irq[i] == 0) continue;