* [PATCH net] net: pcs: xpcs: fix incorrect number of interfaces
@ 2023-05-09 11:50 Russell King (Oracle)
2023-05-09 12:24 ` Andrew Lunn
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Russell King (Oracle) @ 2023-05-09 11:50 UTC (permalink / raw)
To: Andrew Lunn, Heiner Kallweit
Cc: Jose Abreu, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Michael Sit Wei Hong, Voon Weifeng, netdev
In synopsys_xpcs_compat[], the DW_XPCS_2500BASEX entry was setting
the number of interfaces using the xpcs_2500basex_features array
rather than xpcs_2500basex_interfaces. This causes us to overflow
the array of interfaces. Fix this.
Fixes: f27abde3042a ("net: pcs: add 2500BASEX support for Intel mGbE controller")
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
drivers/net/pcs/pcs-xpcs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/pcs/pcs-xpcs.c b/drivers/net/pcs/pcs-xpcs.c
index 539cd43eae8d..f19d48c94fe0 100644
--- a/drivers/net/pcs/pcs-xpcs.c
+++ b/drivers/net/pcs/pcs-xpcs.c
@@ -1203,7 +1203,7 @@ static const struct xpcs_compat synopsys_xpcs_compat[DW_XPCS_INTERFACE_MAX] = {
[DW_XPCS_2500BASEX] = {
.supported = xpcs_2500basex_features,
.interface = xpcs_2500basex_interfaces,
- .num_interfaces = ARRAY_SIZE(xpcs_2500basex_features),
+ .num_interfaces = ARRAY_SIZE(xpcs_2500basex_interfaces),
.an_mode = DW_2500BASEX,
},
};
--
2.30.2
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH net] net: pcs: xpcs: fix incorrect number of interfaces
2023-05-09 11:50 [PATCH net] net: pcs: xpcs: fix incorrect number of interfaces Russell King (Oracle)
@ 2023-05-09 12:24 ` Andrew Lunn
2023-05-09 13:45 ` Leon Romanovsky
2023-05-10 9:30 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Andrew Lunn @ 2023-05-09 12:24 UTC (permalink / raw)
To: Russell King (Oracle)
Cc: Heiner Kallweit, Jose Abreu, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Michael Sit Wei Hong, Voon Weifeng,
netdev
On Tue, May 09, 2023 at 12:50:04PM +0100, Russell King (Oracle) wrote:
> In synopsys_xpcs_compat[], the DW_XPCS_2500BASEX entry was setting
> the number of interfaces using the xpcs_2500basex_features array
> rather than xpcs_2500basex_interfaces. This causes us to overflow
> the array of interfaces. Fix this.
>
> Fixes: f27abde3042a ("net: pcs: add 2500BASEX support for Intel mGbE controller")
> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Andrew
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH net] net: pcs: xpcs: fix incorrect number of interfaces
2023-05-09 11:50 [PATCH net] net: pcs: xpcs: fix incorrect number of interfaces Russell King (Oracle)
2023-05-09 12:24 ` Andrew Lunn
@ 2023-05-09 13:45 ` Leon Romanovsky
2023-05-10 9:30 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Leon Romanovsky @ 2023-05-09 13:45 UTC (permalink / raw)
To: Russell King (Oracle)
Cc: Andrew Lunn, Heiner Kallweit, Jose Abreu, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Michael Sit Wei Hong,
Voon Weifeng, netdev
On Tue, May 09, 2023 at 12:50:04PM +0100, Russell King (Oracle) wrote:
> In synopsys_xpcs_compat[], the DW_XPCS_2500BASEX entry was setting
> the number of interfaces using the xpcs_2500basex_features array
> rather than xpcs_2500basex_interfaces. This causes us to overflow
> the array of interfaces. Fix this.
>
> Fixes: f27abde3042a ("net: pcs: add 2500BASEX support for Intel mGbE controller")
> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> ---
> drivers/net/pcs/pcs-xpcs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Thanks,
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH net] net: pcs: xpcs: fix incorrect number of interfaces
2023-05-09 11:50 [PATCH net] net: pcs: xpcs: fix incorrect number of interfaces Russell King (Oracle)
2023-05-09 12:24 ` Andrew Lunn
2023-05-09 13:45 ` Leon Romanovsky
@ 2023-05-10 9:30 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-05-10 9:30 UTC (permalink / raw)
To: Russell King
Cc: andrew, hkallweit1, Jose.Abreu, davem, edumazet, kuba, pabeni,
michael.wei.hong.sit, weifeng.voon, netdev
Hello:
This patch was applied to netdev/net.git (main)
by David S. Miller <davem@davemloft.net>:
On Tue, 09 May 2023 12:50:04 +0100 you wrote:
> In synopsys_xpcs_compat[], the DW_XPCS_2500BASEX entry was setting
> the number of interfaces using the xpcs_2500basex_features array
> rather than xpcs_2500basex_interfaces. This causes us to overflow
> the array of interfaces. Fix this.
>
> Fixes: f27abde3042a ("net: pcs: add 2500BASEX support for Intel mGbE controller")
> Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
>
> [...]
Here is the summary with links:
- [net] net: pcs: xpcs: fix incorrect number of interfaces
https://git.kernel.org/netdev/net/c/43fb622d91a9
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-05-10 9:30 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-09 11:50 [PATCH net] net: pcs: xpcs: fix incorrect number of interfaces Russell King (Oracle)
2023-05-09 12:24 ` Andrew Lunn
2023-05-09 13:45 ` Leon Romanovsky
2023-05-10 9:30 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).